Cook the pasta in a large pot of boiling salted water until al dente, then drain and set aside.
Heat olive oil in a skillet over medium heat and add the sliced mushrooms. Sauté until golden brown and fragrant, about 8 minutes, stirring occasionally.
12 oz pasta (penne or fusilli)
Add minced garlic to the skillet and cook for about 1 minute until it releases its aroma.
12 oz pasta (penne or fusilli)
Stir in the chopped sun-dried tomatoes and cook for another 2 minutes to let the flavors meld.
12 oz pasta (penne or fusilli)
Toss in the chopped spinach and cook until just wilted, about 2 minutes, allowing it to reduce in volume.
12 oz pasta (penne or fusilli)
Pour in the heavy cream and season with salt and pepper; stir to combine and let it simmer for 2-3 minutes, creating a creamy sauce.
12 oz pasta (penne or fusilli)
Combine the cooked pasta with the mushroom and spinach mixture in the skillet, tossing gently to coat evenly with the sauce.
Transfer the mixture into a buttered baking dish, spreading it out evenly and sprinkling shredded mozzarella cheese on top.
12 oz pasta (penne or fusilli)
Bake in a preheated oven at 375°F (190°C) until the cheese is melted and bubbly, about 20 minutes. The edges should be golden and crispy.
Remove from the oven and let cool slightly before serving, allowing the flavors to settle and the cheese to firm up a bit.