Place a steamer basket in a large stock pot. Add 1" of water. Cover and bring to a boil.
Add spinach, cover and steam for a minute or two until it is wilted down.
Transfer spinach to a strainer and squeeze out as much liquid as possible. Let it cool down while you cook the mushrooms.
Heat 2 tbsp olive oil in a large skillet. Add shallots, mushrooms and a pinch of salt. Cook, stirring frequently, until liquids have evaporated, 10 to 12 minutes.
Add garlic and cook another minute. Remove from the heat.
Preheat oven to 350°F.
Cook the pasta in a large amount of salted water according to package directions for al dente.
Shred cheddar cheese and Pecorino into a small bowl and combine.
In a large bowl, place ricotta cheese, eggs, salt, pepper and nutmeg and combine.
Take spinach out of the strainer and chop coarsely on the cutting board.
Add mushrooms and chopped spinach to the bowl with the ricotta mix, stir until combined.
Drain the pasta and add to the bowl. Combine.
Oil baking dish with 1 tbsp olive oil. Pour in half of the pasta mix. Top with half of the cheddar cheese and Pecorino mix. Continue with the other half of the pasta and finish with the rest of the cheese.
Cover with aluminum foil and bake for 30 minutes.
Remove foil and continue baking for 10 minutes.
Rest 5 minutes before serving.