Boil the shells. Bring a large pot of salted water to a boil.
Cook jumbo shells until just shy of al dente (usually 1–2 minutes less than package instructions). Drain and rinse under cool water to stop cooking. Lay on a lightly oiled sheet to prevent sticking.
Prep the spinach. If using frozen spinach, thaw completely and squeeze out as much water as possible.
If using fresh, sauté in a little olive oil until wilted, then squeeze dry and chop. Excess moisture can make the filling runny, so really wring it out.
Make the filling. In a bowl, mix ricotta, 1 1/2 cups mozzarella, Parmesan, egg, spinach, garlic, Italian seasoning, and red pepper flakes if using. Season with salt and pepper.
The mixture should be thick and scoopable.
Warm the sauce. In a baking dish (9x13 inches works well), spread about 1 1/2 cups marinara sauce to coat the bottom. This prevents sticking and keeps the shells moist.
Stuff the shells. Use a spoon or a piping bag to fill each shell with the ricotta mixture. Nestle the stuffed shells into the sauce, open side up, snugly but not squished.
Top and bake. Spoon another 1 1/2 to 2 cups marinara over the shells (leave some pasta peeking through).
Sprinkle the remaining mozzarella on top. Cover with foil, tented so it doesn’t stick to the cheese.
Bake. Bake at 375°F (190°C) for 20 minutes covered, then uncover and bake 10–15 minutes more, until the cheese is bubbly and lightly golden.
Rest and serve. Let the dish rest for 5–10 minutes. Garnish with chopped basil or parsley.
Taste and finish with a little extra Parmesan and black pepper if you like.