Preheat and prep: Heat the oven to 375°F (190°C).
Lightly grease a 9x13-inch baking dish.
Cook the pasta: Boil penne in well-salted water until just shy of al dente (about 1–2 minutes less than package). Drain and set aside.
Sauté aromatics: In a large skillet, warm olive oil over medium heat. Add onion with a pinch of salt and cook until soft, 4–5 minutes.
Stir in garlic for 30 seconds.
Wilt the spinach: Add fresh spinach in batches and cook until wilted. If using frozen spinach, stir it in and cook off excess moisture. Season with salt and pepper.
Make the sauce: Stir in marinara, ricotta, cream, Italian seasoning, and red pepper flakes.
Simmer gently for 2–3 minutes. Taste and adjust salt and pepper.
Combine: Add the cooked penne to the skillet and toss to coat. Stir in 1 cup mozzarella and 1/4 cup Parmesan.
Assemble: Transfer to the baking dish.
Top evenly with remaining 1/2 cup mozzarella and 1/4 cup Parmesan.
Bake: Bake uncovered for 18–22 minutes, until bubbly around the edges and lightly golden on top.
Rest and serve: Let it rest 5–10 minutes to set. Garnish with basil or parsley. Serve warm.