Heat the over broiler for 5 minutes. If using a grill, heat on high flame.
Wash and dry the eggplant and tomatoes. Pierce the eggplants with a knife several times to avoid it from bursting during cooking.
If using a broiler, line a baking sheet with tin foil and place the eggplant and tomatoes on the baking sheet and place in the broiler, turning frequently to char all sides.
If using a grill, place the eggplant and tomatoes directly on the grates and char all sides. The vegetables are done when they become soft and the skins are charred.
Remove from the oven (or grill) and set aside to cool.
When cool enough to handle, remove and discard the skins of the eggplant and tomatoes. Transfer to a clean cutting board and roughly chop.
Heat the oil in a large pan. Add the garlic and saute over medium-low heat, taking care not to allow the garlic to brown.
Add tomatoes and cook over medium heat for 10-15 minutes or until the juices evaporate, stirring frequently. Add tumeric, salt, and pepper and cook for an additional 5 minutes, stirring occasionally.
Add eggplant and mix well. Allow to simmer for 5-10 minutes, stirring frequently. The mixture should be very soft.
Make 4 wells into the mixture and crack the eggs into the wells, spacing apart so they cook evenly. Turn the heat to medium-low and cover with a lid. Cook the eggs until your liking, about 5-7 minutes.
Remove from heat and tranfer to a dish. Garnish with basil, mint, or parsley if desired. Serve with soft, warm pita bread.