Preheat the oven. Preheat oven to 375°F (190°C). Cook the pasta shells until just al dente according to package directions. Drain and set aside.
Sauté the spinach. Heat olive oil in a large skillet over medium heat. Add garlic and cook until fragrant, about 30 seconds.Add spinach, ½ teaspoon kosher salt, ¼ teaspoon black pepper, and red pepper flakes. Cook until just wilted, 2–3 minutes. Remove from heat.
Make the ricotta filling. In a large bowl, combine ricotta, mozzarella, ¼ cup Parmesan, egg, basil, and the warm spinach mixture.Season lightly with the remaining ½ teaspoon salt and ¼ teaspoon black pepper, stirring until fully combined.
AssembleSpread ½ cup marinara sauce in the bottom of an 8×8-inch ceramic or stoneware baking dish.Fill each pasta shell generously with the ricotta mixture and arrange in the dish. Spoon the remaining marinara evenly over the shells.
Bake (uncovered). Bake uncovered for 35–40 minutes, until the sauce is bubbling and the tops of the shells are lightly golden.
Finish & serve. Remove from the oven, sprinkle with the remaining Parmesan, and let rest for 5 minutes before serving.