Preheat and prep: Heat the oven to 375°F (190°C).
Lightly grease a 9x13-inch baking dish with olive oil.
Season the sauce: In a bowl, stir together marinara, Italian seasoning, garlic powder, red pepper flakes, and a pinch of salt and pepper. Taste and adjust.
Layer the base: Spread 1 cup of sauce in the baking dish. If using pasta, toss it with 1 cup of sauce and scatter evenly in the dish.
Add meatballs: Arrange the meatballs in a single layer over the sauce (and pasta, if using).
Nestle in spinach or sautéed veggies if you like.
Add ricotta: Dollop spoonfuls of ricotta between the meatballs. This melts into creamy pockets throughout the casserole.
Top with sauce and cheese: Pour the remaining sauce evenly over everything. Sprinkle mozzarella, then Parmesan, over the top.
Bake: Cover loosely with foil and bake for 20 minutes.
Remove foil and bake another 10–15 minutes, until the cheese is melted and bubbling and the edges are lightly golden.
Finish and serve: Let the casserole rest for 5–10 minutes so it sets slightly. Garnish with chopped basil or parsley. Serve with garlic bread or a green salad.