Prep the mushrooms: Heat the oven to 425°F (220°C).
Line a baking sheet with parchment. Wipe the mushroom caps clean with a damp towel, remove stems, and gently scrape out the dark gills with a spoon.
Season and pre-bake: Brush both sides of each cap with olive oil. Season with salt and pepper.
Place gill-side up on the baking sheet and bake for 8–10 minutes until they release some moisture and begin to soften.
Drain excess moisture: Carefully tilt each cap over the sink or baking sheet to pour off any pooled liquid. Pat the inside lightly with a paper towel to keep the filling from getting watery.
Add flavor base: Combine minced garlic with a teaspoon of olive oil and the balsamic vinegar. Brush or spoon this mixture inside each mushroom cap.
If using pesto, spread a thin layer now.
Build the filling: Add mozzarella pieces to each cap. Tuck halved tomatoes around the cheese. Sprinkle with a little salt, pepper, and red pepper flakes if you like heat.
Bake until melty: Return to the oven and bake for 8–12 minutes, until the cheese is melted and the tomatoes look juicy.
If you want some golden spots, switch to broil for the last 1–2 minutes, watching closely.
Finish and serve: Top with torn fresh basil. Drizzle lightly with more olive oil and a few drops of balsamic. Add a shower of Parmesan, if using.
Serve hot or warm.