Sweet vine tomatoes star in this colourful tart, layered with caramelised onions, fresh herbs and a kick of chilli