Preheat your oven to 400°F (200°C). On a large sheet pan, toss the halved tomatoes, onion wedges, and whole garlic cloves with olive oil, salt, and pepper. Arrange the tomatoes cut-side up. Roast for 40 to 45 minutes until the tomatoes are charred on the edges and the onions are soft.
Transfer the roasted tomatoes, onions, garlic, and all the juices from the sheet pan into a large pot or Dutch oven. Add the vegetable broth and bring the mixture to a gentle simmer over medium heat. Let it cook for about 10 minutes to allow the flavors to meld together.
Add the fresh basil leaves to the pot. Use an immersion blender to blend the soup directly in the pot until it reaches your desired consistency. If you prefer a completely smooth soup, you can transfer it in batches to a standard high-speed blender, but be careful when blending hot liquids.
Stir in the heavy cream and balsamic vinegar. Taste the soup and add more salt or pepper if needed. If you like a bit of heat, stir in the red pepper flakes. Heat through for another 2 minutes, then serve warm.