Preheat the oven to 350 degrees F.Heat a large oven-safe pot over medium-low heat and add the butter. Stir in the onion and garlic with a pinch of salt and pepper. Cook, stirring often, until the onions have softened.
At this time, you can also cook the pasta in another pot. You can cook it before too - just make sure to give it a quick spritz of olive oil so it doesn't stick together.
Toss all the grated cheese together.
Stir the flour into the onions to create a roux. Cook for 2 to 3 minutes, until it becomes golden in color and starts to smell nutty. Slowly stream in the milk while stirring constantly. The mixture will begin to come together and thicken. Stir in the nutmeg.
Add in the spinach - it will seem overwhelming at first, but it will quickly cook down! Stir until it cooks down and softens.
Once the spinach cooks down, stir in almost all of the cheese (reserve a bit for topping) and the pasta. Toss it together over and over until it is combined.
Top with the remaining grated cheese. Top with crispy onions. Bake for 35 to 30 minutes, until golden and bubbly.