Preheat your oven to 375°F.
Cook the jumbo pasta shells according to package instructions until al dente. Drain and set aside.
In a large skillet, heat the olive oil over medium heat. Add the chopped onion and garlic, sautéing until the onion is translucent, about 3-4 minutes.
Stir in the chopped spinach and cook until wilted, about 2 minutes. Remove from heat and let cool slightly.
In a mixing bowl, combine the ricotta cheese, cream cheese, cooked shrimp, cooked crab meat, half of the mozzarella cheese, salt, black pepper, and red pepper flakes (if using). Add the cooled spinach mixture and mix until well combined.
Spread half of the marinara sauce in the bottom of a 9x13-inch baking dish.
Stuff each cooked pasta shell with the seafood mixture and place them in the baking dish.
Pour the remaining marinara sauce over the stuffed shells and sprinkle with the remaining mozzarella and Parmesan cheese.
Cover the dish with aluminum foil and bake for 25 minutes.
Remove the foil and bake for an additional 10 minutes, or until the cheese is bubbly and golden.
Let the dish cool for a few minutes before serving.