1. Roast the tomatoes: Center a rack in the oven. Preheat the oven to 275°F (135°C).
2. Core the tomatoes and halve them crosswise (at the equator.) Arrange the tomatoes, cut side up, side by side, on the baking sheet. Sprinkle lightly with salt. Spray lightly with oil. Place the baking sheet in the oven and bake until the tomatoes have shrunk by about one-third, 1 1/2 to 2 hours. This is an important step to condense tomato flavor and reduce moisture. (The tomatoes can be baked up to 1 day in advance, stored in an airtight container, and refrigerated.)
3. Prepare the pastry: With the pastry cutter, cut out 8 rounds of pastry. Arrange the rounds side by side on a baking sheet. With a fork, prick the pastry. (The pastry rounds can be prepared up to 8 hours in advance. Cover and refrigerate.)
4. Prepare the shallot mixture: In a small saucepan, combine the shallots, oil, and 1/2 teaspoon of salt. Stir to coat the shallots with the oil. Sweat – cook, covered, over low heat, stirring frequently, until the shallots are soft and translucent – about 5 minutes. Add the Espelette pepper and the vinegar. Increase the heat to medium high and cook until the vinegar has evaporated, but the mixture remains moist. Taste for seasoning. (The shallots can be prepared up to 1 day in advance, stored in an airtight container and refrigerated.)
5. Prepare the caramel: In a medium saucepan, combine the sugar, water, and lemon juice and bring to a boil over high heat. Reduce heat to medium and cook undisturbed until sugar begins to caramelize, about 1 minute. Pay close attention as the caramel will deepen in color quickly at this stage. Swirl the pan gently and cook until the caramel is a deep amber, about 1 minute more. Spoon a generous tablespoon of the caramel into the ramekins and tilt the ramekins so that the caramel evenly coats the bottom. (This can be done up to 8 hours in advance. Store at room temperature.)
6. Bake the tatins: About 30 minutes before baking the tatins, center a rack in the oven. Preheat the oven to 375°F (190°C).
7. Arrange the caramel-coated ramekins side by side on a baking sheet. Place 2 or 3 tomato halves, cut side up, into each ramekin. Press down on the tomatoes so that they fit snugly into the ramekins. Spoon the shallot mixture on top of the tomatoes. Place 2 basil leaves on top of the shallots. Sprinkle with the cheese.
8. Place a round of chilled pastry on top of each ramekin and tuck the dough around the tomatoes. Place the baking sheet in the oven and bake until the pastry is puffed and golden and the tomatoes are bubbling around the edges, 25 to 35 minutes. Remove the baking sheet from the oven and transfer the ramekins to a rack to cool for at least 2 minutes.
9. Carefully invert each tatin onto an individual salad plate. Serve slightly warm or at room temperature, garnished with basil leaves. (The tatins can be prepared up to 8 hours in advance, stored at room temperature.)