Make the pesto: Add the basil, 1/4 cup pine nuts, and garlic, to a food processor. With the food processor on, slowly add the olive oil until combined. Mix in the parmesan, season with salt and pepper to taste, and set aside.
Using cheesecloth or your hands, wring out the spinach to get out as much water as possible.
Cook the onions in olive oil over medium heat until translucent. Add the mushrooms, spinach, salt, pepper, and nutmeg. Cook 5-10 minutes.
Transfer the mixture to a medium/large bowl. Mix in the mozzarella, ricotta, parmesan, and egg.
Bring a pot of water to boil. In the meantime, continue with the following steps.
Lay out a grid of wonton wrappers. (I do 12 at a time on a large cutting board.)
Fill each wonton with 1 tbsp of the mixture.
Using a pastry brush, paint the perimeter of the wonton wrapper with the egg wash, cover with another wonton wrapper, and press the edges to seal trying not to trap air with the filling.
As you finish each ravioli, place on a damp towel (or paper towel) so they don't stick.
Once the water is boiling, add the wonton ravioli ~5 at a time. You don't want to crowd them in the pot or they will stick to each other. When they come to the surface they are cooked. Add them to the sauce to finish them or plate.