Preheat and prepare the pan. Heat the oven to 375°F (190°C).
Lightly oil a 9x13-inch baking dish or similar casserole.
Cook the pasta. Boil in well-salted water until 1–2 minutes shy of al dente. Drain and toss with 1 tablespoon olive oil to prevent sticking.
Prep the spinach. If using frozen spinach, thaw and squeeze out excess water with a clean towel until very dry. If using fresh, sauté with a splash of water until wilted, then chop and squeeze dry.
Removing moisture prevents a watery bake.
Blend the creamy base. In a large bowl, whisk ricotta, Greek yogurt, egg, and cottage cheese (if using) until smooth. Stir in garlic, oregano, basil, red pepper flakes, 1 cup mozzarella, and 1/4 cup parmesan. Season with salt and pepper.
Add spinach and sauce. Fold the spinach into the ricotta mixture.
Pour in 2 cups marinara and stir until combined. Taste and adjust salt and pepper.
Combine with pasta. Add the cooked pasta to the bowl and toss until evenly coated. The mixture should look saucy; add more marinara as needed to keep it moist.
Assemble. Spread the pasta mixture in the baking dish.
Top with remaining marinara in light swirls. Sprinkle with the remaining mozzarella and parmesan. Drizzle with the last tablespoon of olive oil for golden browning.
Bake. Cover loosely with foil and bake for 20 minutes.
Remove foil and bake another 10–15 minutes, until the top is bubbly and lightly browned.
Rest and serve. Let the bake rest for 10 minutes so it sets. Garnish with chopped basil or parsley. Slice into squares and serve.