Preheat your oven to 180°C (350°F).
Cook the pasta according to package instructions until al dente; drain and set aside.
In a large skillet, heat olive oil over medium heat.
Add chopped onion and minced garlic; sauté until softened.
Add fresh spinach and cook until wilted.
Stir in diced tomatoes and season with salt and pepper.
In a bowl, mix cooked pasta with the spinach mixture and ricotta cheese.
Transfer the mixture to a baking dish.
Top with grated mozzarella and parmesan cheese.
Bake in the preheated oven for 25-30 minutes until golden and bubbly.