Preheat oven to 400F.
Boil water and salt it, cook pasta to 2 minutes just-shy of al dente. Reserve 1/2 cup starchy cooking liquid before draining.
Meanwhile, heat EVOO in a skillet over medium high heat. Add mushrooms, brown well then add onions, garlic and thyme, and season with salt and pepper. Cook to soften onions then wilt in greens, deglaze the pan with wine, reduce heat to low.
While mushrooms cook, in a saucepot over medium heat, melt butter. Whisk in flour, cook 1 minute then whisk in milk. Bring to bubble, season sauce with salt and pepper. Let thicken, season with nutmeg to taste.
Drain pasta and combine with mushrooms, greens and a little starchy cooking water. Transfer to a baking dish or casserole, pour the white sauce over top and cover with cheese. Bake until bubbly and brown, 20 minutes or so.