Preheat oven to 375F.
In a large iron or nonstick skillet (with an ovenproof handle) or flameproof casserole dish, heat the oil, add the garlic, onions, eggplant, zucchini, and pepper, and saute the vegetables until they are barely tender.
Add the oregano, sugar, salt (if desired) and ground pepper, mixing the ingredients to combine them well. Arrange the tomato slices on top of the mixture, place the skillet or casserole in the hot oven, and bake the casserole for 10 to 15 minutes or until the tomatoes are cooked.