Prepare the vegetables. Wash and dry the peppers and eggplants. Preheat the oven to 450°F (230°C), conventional heat, or 410°F (210°C) with convection. Prick each eggplant several times with a fork.
Roast in uncrowded batches. Arrange the whole vegetables in a single layer on heavy metal baking sheets. Roast each batch for about 40–55 minutes, turning the peppers once or twice, until the skins blister and darken and the flesh softens. Remove eggplants when completely soft; large ones may need longer. Roast any optional hot pepper alongside the sweet peppers.
Steam and peel. Transfer each batch of hot peppers to a heat-safe bowl, cover, and steam for 20 minutes. Remove stems, seeds, pale membranes, and skins without rinsing the flesh. Scoop the eggplant flesh from its skin and discard burnt skin fragments.
Drain under refrigeration. Place the peeled flesh in a clean cloth-lined sieve over a bowl. Refrigerate peeled portions promptly as you work, within 2 hours of roasting, or within 1 hour if the room is above 90°F (32°C). Cover loosely and drain in the refrigerator for 3 hours after adding the last batch. Discard the drained liquid.
Grind with some texture. Pass the drained vegetables through a medium grinder plate, or pulse in small batches in a food processor. Aim for a fine, slightly fibrous texture rather than a smooth puree. Include the peeled optional hot pepper if using.
Reduce the excess liquid. Put the ground vegetables into a wide, heavy-bottomed pot. Cook uncovered over medium heat for about 15 minutes, stirring across the bottom to evaporate excess moisture.
Work in the oil gradually. Stir in about one quarter of the oil. Once incorporated, add the next portion, continuing until all the oil is worked in. Cook uncovered over low to medium-low heat for 60–90 minutes, stirring regularly and more often as the mixture thickens.
Season near the end. About 15 minutes before the end of cooking, stir in the grated garlic, salt, and vinegar. Continue stirring and cooking until the spread is thick and glossy, clings to the spoon, and a trail drawn across the pot bottom stays briefly visible. Cool a spoonful on a clean plate before tasting the seasoning.
Cool and refrigerate promptly. Divide the cooked ajvar into clean, small, shallow heat-safe containers. Refrigerate promptly rather than leaving a deep pot or full jars to cool on the counter. Refrigerate within 2 hours of cooking, or 1 hour above 90°F (32°C). Keep at 40°F (4°C) or colder and use within 3–4 days.
Freeze surplus, do not pantry-store. For longer storage, chill promptly in the refrigerator, then pack in freezer-safe portions with expansion space and freeze at 0°F (−18°C). Best quality is about 3 months. Thaw in the refrigerator and use within 3–4 days. This recipe is not a validated canning process: hot filling, a sealed lid, vinegar, or an oil layer do not make it shelf-stable.