Heat oven to 475F/250C. Place washed eggplants and peppers on a baking sheet with a lip to catch any juices, and roast until their skins blister and turn black, about 30 minutes. Place roasted vegetables in a heatproof bowl. Cover with plastic wrap and let them steam for 10 minutes.
Peel off and discard blackened skins, stems and seeds. In a large bowl, mash or chop vegetables, depending on how smooth or chunky you like your ajvar. Season to taste with salt and pepper. Add garlic and lemon juice, and drizzle in oil, stirring constantly.
Transfer to a glass dish and sprinkle with chopped parsley for garnish, if desired. Store covered and refrigerated for up to 1 week.