Lightly oil or spray a 9 X 13 inch baking pan and set aside. Preheat the oven to 350 degrees F.: The slightly slick surface will prevent the shells from sticking during baking, and it also helps the sauce glide under the shells for even heating. You should feel a thin, even sheen on the pan when you run your finger across it, not a puddle of oil. If you skip this, shells at the edges may cling to the dish and tear when you serve.
Bring a large pot of salted water to a boil. Partially cook the pasta shells in water, 4-6 minutes. Strain the shells and lay in the pan. (See no-boil instructions in notes.): You will notice a gentle warmth in the kitchen as the oven comes up to temperature, and preheating ensures even baking from the moment the pan goes inside. Setting the oven early prevents the center shells from staying cold while the edges overcook. A common misstep is not allowing the oven to fully reach temperature, which can lengthen bake time and affect texture.
Mix the ricotta, parmesan, egg, parsley, rosemary, salt, pepper, nutmeg, and crushed red pepper together in a medium bowl. Fill each shell with 1-2 tablespoons of the cheese mixture.: The water should roar with energetic bubbles and taste slightly of the sea when you add a drop to your lips. Properly salted water seasons the pasta shells from within. Under salting makes the shells taste flat, while oversalting can make the whole dish too salty when combined with the parmesan cheese .
Spoon the sauce on and around the shells. Top with mozzarella cheese. Cover the pan tightly with foil. Bake until bubbly and golden, about 25 minutes. If you want the cheesy top golden, take the foil off the last 3-5 minutes.: Stop when the shells are tender but still firm to the bite, they will finish cooking in the oven. You want a slight resistance when bitten, not a floppy, mushy texture. Overcooking will lead to torn shells while stuffing, so watch closely and taste a shell at the lower end of the time range.
Strain the shells and lay in the pan: After draining, arrange the shells open side up in the prepared baking pan , spacing them so they do not touch too tightly. They should feel warm and slightly springy. If they cool too quickly they can stiffen, making stuffing more difficult, so work efficiently.
Mix the ricotta, parmesan, egg, parsley, rosemary, salt, pepper, nutmeg, and crushed red pepper together in a medium bowl: As you stir the filling, observe the creamy, slightly granular texture of the ricotta cheese marrying with the grated parmesan cheese and the sheen of the beaten egg . The aroma will shift as the herbs and spices disperse, giving a bright, herbaceous lift. If the mixture seems too loose, a touch more parmesan cheese will tighten it up; if too stiff, a spoonful of marinara can soften it.
Fill each shell with 1-2 tablespoons of the cheese mixture: You should see a neat mound of filling sitting snug inside each shell, glossy and well seasoned. Use a small spoon to press the filling into the shell so it nests securely; when stuffed properly, the shells will hold their shape rather than collapse. Avoid overfilling, which can cause the filling to ooze out during baking.
Spoon the sauce on and around the shells: Pour marinara over and between the shells until there is a generous, but not drowning, coating. You want the sauce to provide moisture and flavor without making the dish watery. The surface should glisten with sauce, and you should see pockets of red between shells. If the sauce is too thin, simmer it first to thicken.
Top with mozzarella cheese: Scatter an even blanket of shredded mozzarella cheese over the sauced shells so it melts uniformly into a bubbly, golden crust. The cheese should cover most shells but not be piled so high that it prevents even browning. If the topping is uneven, some areas will overbrown while others remain pale.
Cover the pan tightly with foil: A snug foil tent traps steam and warms the filling gently, ensuring the shells heat through without drying. You should see slight condensation form under the foil after minutes in the oven, a sign the dish is steaming properly. Leaving the pan uncovered the whole time risks drying out the tops and the filling.
Bake until bubbly and golden, about 25 minutes: The dish will fill the kitchen with a rich, tomato and cheese aroma, and the sauce around the edges should be actively bubbling. If you want the cheesy top golden, take the foil off the last 3-5 minutes. Watch for bubbling sauce and a lightly browned cheese surface; if the top browns too fast, re-cover with foil to finish heating through.