Heat 2 tablespoons of butter in a large skillet over medium heat.
Add the mushrooms and onion and cook until softened and lightly browned.
In a separate skillet, melt the remaining butter and add the spinach. Cook until fully wilted, then squeeze out excess liquid and set aside.
Add the chopped bacon to the mushroom mixture and cook until crisp.
Stir in the garlic and cook briefly until fragrant.
Add the cream cheese and stir until melted and smooth.
Pour in the heavy cream and add the nutmeg, stirring until the sauce thickens slightly.
Add the mozzarella and Parmesan cheeses and stir until fully melted and creamy.
Fold in the drained spinach and mix well.
Season with salt and black pepper and serve warm.