Preheat the oven to 350°F (175°C) and spray a 9x13-inch baking dish with cooking spray.
Heat the olive oil in a large skillet over medium heat. Add the diced onion and cook until softened, about 4–5 minutes.
Add the minced garlic, chopped portobello, and diced red pepper to the skillet; sauté until the vegetables are tender, about 4–6 minutes. Remove from heat and let cool slightly.
In a large bowl, combine the ricotta, 1/4 cup of the shredded mozzarella, and 1/4 cup of the grated Parmesan. Stir in the egg, drained chopped spinach, dried basil, crushed red pepper, salt, and black pepper until creamy.
Fold the cooled mushroom, onion, and red pepper mixture into the ricotta mixture until evenly combined.
Spread 1/2 cup of marinara sauce over the bottom of the prepared baking dish.
Place the cooked jumbo shells in the dish in a single layer and spoon the ricotta mixture into each shell, spacing them evenly.
Pour the remaining marinara sauce over the stuffed shells, then sprinkle the remaining mozzarella and Parmesan over the top.
Cover the dish with foil and bake for 30 minutes. Remove the foil and bake an additional 5 minutes until bubbling and cheese is melted.
Let the casserole rest for a few minutes before serving warm.