01 - Preheat your oven to 350°F (180°C). Lightly grease a 9x13 inch (23x33 cm) baking dish.
02 - In a large pot, bring salted water to a rolling boil. Cook the jumbo pasta shells until they are al dente, following the package directions. Drain thoroughly and set aside to cool sufficiently for handling.
03 - In a saucepan, heat the olive oil over medium heat. Add the finely chopped onion and sauté until softened, approximately 4 minutes. Introduce the minced garlic and cook for an additional minute until fragrant. Stir in the marinara sauce, dried basil, dried oregano, salt, and pepper. Allow to simmer for 10 minutes. Spread half of this sauce evenly across the bottom of the prepared baking dish.
04 - In a substantial mixing bowl, combine the ricotta cheese, drained thawed spinach, 2 oz of the grated Parmesan cheese, 3/4 cup of the shredded mozzarella cheese, the large egg, minced garlic, salt, black pepper, and the optional ground nutmeg. Mix these ingredients until a smooth and cohesive filling is achieved.
05 - Carefully spoon approximately 1.5 tablespoons of the prepared ricotta-spinach mixture into each cooled pasta shell. Arrange the filled shells snugly over the layer of sauce in the baking dish.
06 - Generously spoon the remaining marinara sauce over the stuffed shells. Evenly distribute the remaining shredded mozzarella and grated Parmesan cheese over the top. Cover the baking dish securely with aluminum foil. Bake for 25 minutes. Then, remove the foil and continue baking for an additional 10 minutes, or until the cheese is beautifully golden and bubbly.
07 - Allow the baked shells to rest for 5 minutes before serving to allow the flavors to meld and the structure to set.