Preheat the oven to 375 degrees F and line a large baking sheet with aluminum foil.
Slice tomatoes in half, toss with olive oil and sprinkle with sea salt.
Remove the excess outer layers of skin from the garlic. Carefully slice off the top of the head so that the cloves are exposed. Place the head in a ramekin and drizzle with olive oil and salt. Cover with foil. Next, slice the root end from the shallots and peel away the skin. Place in a separate ramekin, drizzle with olive oil and cover with foil. Place both ramekins in the center of the prepared baking sheet and spread the tomatoes out evenly around them, cut side up. Cook the tomatoes, garlic and shallots together for one hour, then allow them to cool. Once the garlic has cooled, squeeze the roasted cloves out of their skins (discard the skins).
Turn the oven up to 475 degrees F. Coat the red pepper lightly with olive oil. Roast in the oven for 30 minutes, turning it after 15 with tongs and then checking it every 5 minutes or so. Turn the pepper as the skin blackens. After 30 minutes remove it from the oven to cool. Once it has cooled, peel away the skin and discard the seeds.
Slice the cucumber in half lengthwise. Scoop out the seeds with a spoon and discard them. Chop the cucumber into smaller pieces.
Add the roasted tomatoes, garlic, and shallots to a sturdy blender, including all juices and olive oil from the pan and ramekins. Add the roasted red pepper, cucumber and basil. Puree until very smooth. Add the vinegar, salt and pepper and puree. Adjust seasonings to taste.
Strain the soup through a food mill, chinois or fine mesh strainer. Allow to chill overnight in the refrigerator so the flavors have a chance to blend. Before serving, top with garnishes if using.