Prepare the spinach
Heat half of the olive oil in a large skillet over medium-high heat. Add the chopped onion and sauté until softened and just beginning to turn golden.
Add the spinach gradually, seasoning lightly with salt. Cook until the spinach has wilted and released most of its liquid. Transfer the spinach to a bowl and set aside.
Prepare the tomato sauce
Using the same skillet, add the remaining olive oil. Add the chopped garlic and sauté briefly, just until it begins to take on a little color.
Add the tomato paste and stir for a minute to cook it slightly. Pour in the white wine and allow it to simmer for a few seconds, until the alcohol evaporates.
Add the chopped tomatoes, tomato passata, black pepper, sugar and a little salt. Stir well and simmer for approximately 5 minutes, until the sauce has reduced slightly and thickened.
Assemble the ravioli
Preheat the oven to 180°C fan.
Spread approximately one-third of the tomato sauce over the bottom of a baking dish measuring approximately 20 × 30 cm.
Arrange one layer of ravioli directly from the freezer over the sauce. Cover with half of the cooked spinach.
Add another one-third of the tomato sauce and sprinkle with half of the grated mozzarella.
Arrange the second package of frozen ravioli over the top. Add the remaining spinach, followed by the remaining tomato sauce. Finish with the remaining grated mozzarella, spreading it evenly over the entire surface.
Cover the baking dish loosely with aluminum foil, taking care, as much as possible, that the foil does not touch the surface of the food.
Bake in the preheated oven at 180°C fan for 30 minutes.
Remove the aluminum foil and continue baking for another 10–15 minutes, until the mozzarella is melted and golden