01 - Preheat the oven to 400°F. Lightly grease a medium baking dish.
02 - Bring a large pot of salted water to a boil. Cook the pasta 2 minutes less than package instructions for al dente. Drain and set aside.
03 - In a large skillet, melt the butter over medium heat. Add the onion and cook until soft, about 3–4 minutes. Stir in the garlic and cook for 1 minute.
04 - Sprinkle in the flour and cook, stirring, for 1 minute. Gradually whisk in the milk and cream. Bring to a simmer and cook, stirring constantly, until thickened, about 3–4 minutes.
05 - Add the mozzarella, Parmesan, ricotta, salt, pepper, and nutmeg. Stir until cheeses are melted and sauce is smooth.
06 - Add the spinach and cook until just wilted, 1–2 minutes.
07 - Combine the drained pasta with the sauce. Mix well and transfer to the prepared baking dish.
08 - Sprinkle with the extra mozzarella and Parmesan for topping.
09 - Bake for 20–25 minutes, until golden and bubbling. Let rest for 5 minutes before serving.