Preheat the oven to 400°F (200°C).
Cut the tomatoes in half and arrange them cut-side up on a baking sheet. Add the chopped onion and minced garlic around the tomatoes.
Drizzle the olive oil over the tomatoes, onion, and garlic. Sprinkle with salt, black pepper, oregano, and red pepper flakes if using.
Roast in the preheated oven for 30-35 minutes, or until the tomatoes are caramelized and the onion is soft.
Once roasted, remove from the oven and let cool for a few minutes.
Transfer the roasted vegetables to a large pot. Add the vegetable broth and bring to a simmer over medium heat.
Add the fresh basil leaves and balsamic vinegar to the pot. Simmer for an additional 5-10 minutes to infuse the flavors.
Using a blender or immersion blender, puree the soup until smooth. Taste and add sugar if you prefer a sweeter taste, adjusting seasoning as necessary.
Serve hot, garnished with extra fresh basil leaves.