Preheat your oven to 450°F (230°C).
Place the red bell peppers and eggplants on a baking sheet.
Roast in the preheated oven for about 30-40 minutes, turning occasionally, until the skins are charred and the vegetables are soft.
Remove the roasted vegetables from the oven and place them in a large bowl.
Cover the bowl with plastic wrap or a lid and let them steam for about 10 minutes. This will make peeling the skins easier.
Peel the skins off the peppers and eggplants, remove the seeds, and roughly chop the flesh.
In a food processor, combine the chopped peppers and eggplants. Blend until smooth, or leave it slightly chunky if you prefer a coarser texture.
In a large skillet or pot, heat the olive oil over medium heat.
Add the minced garlic and sauté for about 1 minute until fragrant.
Add the blended pepper and eggplant mixture to the skillet.
Stir in the white vinegar, salt, black pepper, sugar (if using), and chili flakes (if using).
Cook the mixture over medium heat, stirring occasionally, for about 30-40 minutes, or until thickened to your liking.
Allow the ajvar to cool to room temperature.
Transfer to a serving bowl and garnish with chopped fresh parsley if desired.
Enjoy your meal!