Slice eggplant and salt each side liberally to prevent bitterness.
To prevent soggy eggplant,place in a colander set over a bowl and let drain while making sauce.
For the sauce,cut an X in bottom of each tomato with a sharp paring knife and blanch tomatoes together in a pot of boiling water 1 minute.
Transfer tomatoes with a slotted spoon to a cutting board and, when cool enough to handle, peel off skin, beginning from scored end, with paring knife.
Coarsely chop tomatoes, then purée in a blender for 30 seconds.
Heat 3 tablespoons oil in a 5-quart heavy pot over moderately high heat until hot but not smoking, then add garlic and shallots,sauté, stirring, until golden, about 30 seconds. Add tomato purée,tomato paste, basil, salt, pepper,sugar,and red pepper flakes and simmer, uncovered, stirring occasionally, until slightly thickened, 25 to 30 minutes.
Heat 3 tablespoons oil in frying pan for eggplant.
Dip eggplant into beaten egg and then into breadcrumb mixture.
place eggplant into hot oil and brown each side.
Once eggplant is browned, transfer it to a plate with paper towels to absorb the oil.
Preheat oven at 350°.
In a 9X13 baking dish, pour a third of the sauce on the bottom,.
arrange eggplant slices on top of the sauce.
Layer with cheeses,add more sauce,cheese and finish with sauce.
Cover with foil and cook for 30 minutes.
Remove from oven and let stand for 5 minutes before serving.