For the tomato sauce: In a large skillet, heat the olive oil over medium-high heat. Add the onion and garlic and season with salt and red pepper flakes. Cook until the onions become translucent, 3 to 5 minutes. Add the sugar and the canned tomatoes. Use a wooden spoon to break up some of the whole tomatoes and cook 10 to 15 minutes over medium heat, stirring from time to time. Taste for seasoning, the tomatoes should be fairly broken down and the flavors coming together. Cook for another few minutes if the tomatoes still taste like they need a little more time to break down. Set aside to cool.
For the eggplant (this step is optional, leave it out if you have limited time): Arrange the eggplant rounds in a single layer on 2 baking sheets. Sprinkle with salt on both sides of each slice and allow it to sit for about 1 hour. Salting it draws out the liquid and bitter flavor. After an hour, rinse with cold water and dry them thoroughly with a kitchen towel.
Put the flour in a medium bowl and season with salt and pepper. In another bowl, whisk together the eggs and milk and season with salt and pepper. In a third bowl, combine the breadcrumbs with the oregano and fresh thyme leaves and season with salt and pepper. Dip each eggplant slice in the flour and shake off any excess. Then, dip in the egg mixture, and finally in the breadcrumbs. Make sure to coat both sides of each slice of eggplant. Arrange them in single layers on the baking sheets.
In a large skillet, pour enough oil to accumulate about 1/2-inch in the bottom. Heat the oil until it begins to smoke lightly (alternatively, test with a thermometer and wait until the oil registers between 380 degrees F and 400 degrees F). Use a pair of kitchen tongs to add a single layer of the eggplant to the pan. Cook them until they are golden brown, about 2 minutes on each side. Remove from the oil and transfer to a baking sheet fitted with a kitchen towel so the eggplant can drain as the others cook. Season lightly with salt. Take care to reheat the oil back up to temperature before adding another batch of slices to the pan.
Preheat oven to 350 degrees F.
To assemble: In a 9 by 13-inch flameproof baking dish, spoon about 1/4 of the tomato sauce on the bottom. Top with a layer of the fried eggplant; the eggplant slices can overlap slightly. Top with about 1/3 of the mozzarella slices. Sprinkle with about 1/4 of the Parmesan and provolone cheeses. Top with a layer of torn basil leaves. Spoon sauce and repeat the layering 2 more times to make 3 layers. End with the remaining mozzarella. Carefully press the layers down firmly into the dish once assembled. Place the dish in the top part of the oven and cook until the cheese is melted and bubbly, 35 to 40 minutes. For extra browning, put the dish under the broiler for a minute or two just before serving to get an extra brown cheesy top. I always nibble on a bit of that before sharing it with my friends!