Preheat the oven: Set to 375°F (190°C).
Lightly grease a 9x13-inch baking dish.
Cook the shells: Boil in salted water until just shy of al dente. They should be tender but still firm. Drain and rinse under cool water to stop cooking, then spread on a sheet pan to keep them from sticking.
Prep the spinach: If using frozen, thaw completely and squeeze out as much water as possible.
If using fresh, sauté with olive oil over medium heat until wilted, then cool and squeeze dry. Chop finely.
Make the filling: In a large bowl, mix ricotta, 1 1/2 cups mozzarella, Parmesan, egg, spinach, garlic, Italian seasoning, nutmeg (if using), red pepper flakes (if using), and a good pinch of salt and pepper. Taste and adjust seasoning.
Layer the sauce: Spread 1–1 1/2 cups marinara evenly across the bottom of the baking dish.
This keeps the shells from sticking and adds moisture.
Stuff the shells: Spoon 1–2 tablespoons of filling into each shell. Nestle them open-side up into the sauced baking dish. It’s okay if they’re snug.
Sauce and cheese: Spoon the remaining marinara over the shells, covering most of the pasta.
Sprinkle the remaining 1/2 cup mozzarella and a little extra Parmesan on top.
Bake: Cover with foil and bake for 20 minutes. Remove foil and bake another 10–15 minutes until bubbling and lightly browned in spots.
Rest and garnish: Let the dish sit for 5–10 minutes to set. Top with chopped basil or parsley.
Serve warm.