Add in onions, mushrooms and the garlic; stir until softened (about 4 minutes).
Whisk in the flour, salt, pepper and nutmeg, whisk for 2 minutes.
Gradually add in the cream, continue whisking until thick and until the mixture reaches a light boil, remove from heat then mix in 1/4 cup grated Gruyere or Swiss cheese, stir until cheese melts, (taste for extra seasoning).
In the prepared casserole or baking dish spread half of the spinach, then top the spinach with 2 Tbsp grated Parmesan cheese; then cover with half of the mushroom/cream sauce, then repeat.
Sprinkle with 1/2 cup grated Gruyere or Swiss cheese.