Preheat the oven to 425°F. Arrange the tomatoes, shallots, and bell pepper in a single layer on a large rimmed sheet pan. Drizzle with olive oil and season with kosher salt and black pepper. Depending on the size of your vegetables and your sheet pans, you may need two pans to avoid overcrowding.
Slice ¼ to ½ inch off the top of each garlic head so the cloves peek through, leaving the skins on. Drizzle each head with olive oil, wrap it in foil, and tuck the packets between the vegetables.
Roast for 35 to 40 minutes, until the tomatoes are soft and starting to break down, the shallots are lightly browned on the edges and soft, and the bell pepper skin is blistered and charred in spots. Remove the pan(s) from the oven and let the vegetables cool for about 10 minutes before blending.
Unwrap the garlic, and once it's cool enough to handle, squeeze the roasted cloves from their skins into a blender. If using an immersion blender, transfer them to a large pot instead. Add the roasted tomatoes, shallots, bell pepper, and all the juices from the sheet pan(s).
Add the fresh basil and vegetable broth. Blend until smooth, then pour in the heavy cream and blend again until fully incorporated. Taste and adjust the seasoning with additional kosher salt and black pepper as needed. For an extra-smooth texture, strain the soup through a fine-mesh strainer (optional).
Divide the soup among bowls. Add a drizzle of heavy cream, a pinch of flaky salt, freshly cracked black pepper, and grated Parmesan, if desired. Serve alongside crusty bread or your favorite grilled cheese.