Heat the oven to 220 C / 425 F and line a 33 x 46 cm / 13 x 18 inch sheet pan with parchment. Wipe the caps with a damp paper towel, twist out the stems, and scrape out the gills with a spoon. Finely chop the stems and set them aside.
Brush both sides of the caps with olive oil and season with the salt and black pepper. Set them gill side down on the pan and bake for 10 minutes, until the caps shrink slightly and liquid pools on the parchment.
While the caps bake, stir the chopped stems, spinach, cherry tomatoes, garlic, oregano and red pepper flakes together in a bowl.
Use tongs to flip the caps gill side up, blot them with a paper towel, and tip any liquid off the pan. Spoon 2 tbsp marinara into each cap, divide the filling among them, then top with the mozzarella and Parmesan.
Bake for 10 to 12 minutes, until the cheese is bubbling with a few browned spots and a fork slides into the cap easily. Scatter the basil over the top and serve hot.