Preheat your oven to 180°C (350°F).
Cook the pasta in salted boiling water until al dente, then drain.
In a skillet, heat olive oil and sauté minced garlic until fragrant.
Add fresh spinach and cook until wilted, then remove from heat.
In a bowl, mix ricotta, egg, nutmeg, salt, and pepper until smooth.
Combine cooked pasta with the ricotta mixture and spinach.
Transfer the mixture to a baking dish, spreading evenly.
Top with shredded mozzarella and grated Parmesan.
Bake in the preheated oven for 25-30 minutes until golden and bubbly.
Let it cool for a few minutes before serving.