Heat the oven to 425°F (220°C). Spread the tomatoes cut side up on a large rimmed baking sheet with the onion wedges and garlic cloves.
Drizzle with the olive oil, sprinkle with salt, pepper and red pepper flakes, and roast for 40–45 minutes, until the tomatoes have collapsed and the edges are browned.
Squeeze the garlic out of its skins. Scrape the vegetables and every bit of juice from the pan into a large pot.
Add the stock and the bread. Bring to a simmer over medium heat and cook for 10 minutes, until the bread is completely soft.
Remove from the heat, add the basil and blend until smooth with an immersion blender, or in batches in a countertop blender with the lid vented.
Taste and adjust with salt, balsamic vinegar and more stock if it is too thick. Serve with a drizzle of olive oil and a few small basil leaves.