Preheat the oven to 250 degrees. Arrange tomatoes, cut side up, on a half sheet tray. Drizzle with olive oil and season with a little salt and freshly cracked black pepper. Transfer to the oven and roast until the tomatoes are partially dehydrated and sweetened, 3-4 hours (if you’re using a variety of sizes, keep an eye on any smaller ones and pull them early if necessary). Remove to a wire rack to cool.
In the last hour of slow-roasting, make the caramelized onions. In a medium pan, heat a drizzle of olive oil over medium heat until shimmering. Add sliced red onion and cook, stirring occasionally, until softened and translucent, about 10 minutes. Add red wine vinegar, honey, thyme leaves, and oregano leaves. Season with salt and pepper and stir to combine, then reduce heat to low and continue to cook, stirring occasionally, until onions are golden brown and sticky, 30-40 minutes more. Remove from heat and set aside.
Preheat the oven to 425 degrees. Brush a 9” cast iron skillet with the butter, then artfully arrange the roasted tomatoes, cut side down, in the bottom of the pan, layering sizes and shapes. Scatter tomatoes with the caramelized onions.
Lightly dust a clean work surface with flour and roll out the puff pastry to a generous ¼” thick. Cut a 10” circle, then lay the pastry over the filling, gently tucking the edges down around the caramelized onions and tomatoes. Brush the puff pastry with the egg wash and transfer the skillet to the oven. Bake until pastry is golden and the tarte tatin is bubbling at the edges, about 30 minutes. Remove from the oven and allow to cool slightly, only about 5 minutes, then run a small, sharp knife around the edge of the skillet and carefully turn out onto a serving platter.
While tarte is baking, heat a good drizzle of olive oil in a small skillet over medium-high heat until shimmering. Add the capers and fry until crisp, about 30 seconds or so, then remove from the pan with a slotted spoon and transfer to a paper towel-lined plate to drain.
When ready to serve, scatter the fried capers over the tarte, along with the oregano and basil leaves, and a sprinkle of flaky salt.