01 - Preheat the oven to 400°F. Lightly grease a medium baking dish.
02 - Boil a large pot of salted water. Cook pasta until al dente following package directions. Drain and set aside.
03 - Heat olive oil and butter in a large skillet over medium heat. Add chopped onion and cook for 2 to 3 minutes until softened.
04 - Add sliced mushrooms to the skillet and cook for 5 to 7 minutes until browned and most liquid evaporates. Stir in minced garlic and cook for 1 minute.
05 - Sprinkle flour over vegetables and stir to coat. Gradually whisk in whole milk to prevent lumps. Add heavy cream, dried thyme, ground nutmeg, salt, and black pepper. Simmer for 3 to 4 minutes until sauce thickens.
06 - Stir fresh spinach into the sauce and cook until just wilted, about 1 minute.
07 - Remove skillet from heat. Stir in cooked pasta and half of both mozzarella and Parmesan cheeses until thoroughly combined.
08 - Transfer mixture into the prepared baking dish. Evenly sprinkle remaining mozzarella and Parmesan cheeses on top.
09 - Bake in preheated oven for 20 to 25 minutes until the top is golden brown and bubbling.
10 - Allow to rest for 5 minutes prior to serving.