Set a large strainer over a 4-quart saucepan and pour in the tomatoes, letting the juice run into the saucepan. Set the tomatoes aside.
Add the vinegar, wine, sugar, pepper flakes, oregano, and basil to the juice, place over high heat, and bring just to a boil, stirring occasionally.
Reduce the heat and simmer until the liquid is reduced by half or until it has thickened to a loose syrup consistency, 14 to 20 minutes.
Heat the broiler to high and place an oven rack in the middle position. Toss the onion, carrot, and celery with the oil in a roasting pan. Place under the broiler until the onions have begun to soften, 3 to 5 minutes.
Put the tomatoes into a deep pot or bowl and add the reduced tomato liquid to the tomatoes. Blend to desired consistency and adjust seasoning.
Carefully slide out the rack holding the roasting pan and toss in the tomatoes and capers. Return to the oven and broil, stirring every 5 minutes, until the tomatoes are browned around the edges, 15 to 20 minutes. Carefully transfer the broiled tomato mixture to the saucepan. Remove from heat.
If you’d like, use a hand masher or immersion blender to blend mixture to desired consistency. Season with salt and pepper, to taste.
Serve immediately or let cool to room temperature, seal in an airtight container, and freeze for up to 1 year.