Preheat oven to 375°F (190°C).
In a large skillet, heat olive oil and sauté onions for 3 minutes. Add garlic, cook 1 more minute.
Add mushrooms, salt, and pepper. Cook until mushrooms release moisture and it evaporates, about 10 minutes.
Stir in spinach until wilted. Remove from heat and set aside.
In a bowl, mix ricotta, egg, and nutmeg until smooth.
In a saucepan, melt butter over medium heat. Stir in flour and whisk 1 minute. Gradually add milk, whisking constantly until thickened. Season lightly with salt and pepper.
To assemble: spread a little béchamel in the bottom of a baking dish. Layer noodles, ricotta mixture, mushroom-spinach filling, béchamel, and mozzarella. Repeat layers and finish with Parmesan on top.
Cover with foil and bake 25 minutes. Remove foil and bake another 15 minutes until bubbly and golden.
Cool 10 minutes before slicing.