01 - Preheat oven to 400°F. Grease a medium baking dish.
02 - Bring a large pot of salted water to a boil, cook pasta until al dente according to package directions. Drain and set aside.
03 - Heat olive oil and butter in a large skillet over medium heat. Add chopped onion and cook 2–3 minutes until softened.
04 - Add sliced mushrooms, cook 5–7 minutes until browned and most liquid has evaporated. Stir in minced garlic and cook 1 minute.
05 - Sprinkle flour over vegetables, stir well. Gradually whisk in milk to avoid lumps. Add cream, thyme, nutmeg, salt, and pepper. Simmer 3–4 minutes until thickened.
06 - Stir in fresh spinach and cook until wilted, about 1 minute.
07 - Remove from heat. Add cooked pasta and half of both cheeses to sauce. Mix thoroughly to combine.
08 - Transfer mixture to prepared baking dish. Sprinkle remaining mozzarella and Parmesan cheese evenly on top.
09 - Bake in preheated oven for 20–25 minutes until cheese is golden and bubbling.
10 - Allow to stand 5 minutes before serving to set.