Preheat the oven to 425 degrees.
Drain the thawed spinach and squeeze out as much water as possible. (If necessary, squeeze the spinach two or three times.) Chop coarsely.
Melt the butter in a heavy skillet over medium heat.
Add the onions and cook until soft and translucent, about 10-12 minutes. Do not brown.
Stir in the flour, nutmeg, and (if used) cayenne and cook for about 2 minutes.
Stir in the cream and milk and cook until thickened.
Add the spinach and 1/2 cup parmesan and mix well. Season to taste with salt and black pepper.
Pour the mixture into a baking dish and sprinkle with the rest of the parmesan and the Gruyere.
Bake 15-20 minutes, or until hot, bubbly, and lightly browned in spots.