Preheat and prep: Heat your oven to 375°F (190°C). Lightly grease a 9x13-inch baking dish.
Wilt the spinach: Warm the olive oil in a skillet over medium heat.
Add garlic and cook for 30 seconds, just until fragrant. Stir in the spinach and cook 1–2 minutes until wilted. Season with a pinch of salt and pepper.
If using frozen spinach, skip wilting and make sure it’s squeezed dry.
Mix the ricotta layer: In a bowl, combine ricotta, half of the Parmesan, Italian seasoning, and red pepper flakes. Fold in the spinach. Taste and adjust salt and pepper.
Layer the bake: Spread 1 cup of marinara over the bottom of the dish.
Arrange half the ravioli in a single layer. Dollop and spread half the spinach-ricotta mixture over the ravioli. Sprinkle with 1 cup mozzarella.
Spoon another 1 cup marinara over the top.
Repeat: Add the remaining ravioli, the rest of the spinach-ricotta, the remaining marinara, and the rest of the mozzarella. Finish with the remaining Parmesan on top.
Bake covered: Cover the dish loosely with foil (tent it so it doesn’t stick to the cheese). Bake for 20 minutes.
Uncover and brown: Remove the foil and bake another 10–15 minutes, until the cheese is bubbly and golden in spots.
Rest and garnish: Let it sit for 5–10 minutes to set.
Garnish with fresh basil or parsley. Serve warm.