Cook the jumbo pasta shells according to package instructions until al dente. Drain and set aside to cool slightly.
In a mixing bowl, combine ricotta cheese, sun-dried tomatoes, grated Parmesan, half of the shredded mozzarella, egg, minced garlic, Italian seasoning, salt, black pepper, and red pepper flakes if using. Mix until well incorporated.
Preheat your oven to 375°F (190°C). Fill each cooked shell with about one tablespoon of the ricotta mixture.
Spread about one cup of marinara sauce evenly across the bottom of a greased baking dish. Arrange filled pasta shells in a single layer over the sauce.
Pour the remaining marinara sauce over the stuffed shells and sprinkle with remaining mozzarella and extra Parmesan cheese.
Cover with aluminum foil and bake for approximately 25 minutes. Remove foil during the last 5-10 minutes to allow cheese to melt before serving garnished with fresh basil.