First make the sauce: Put a large saucepan over medium heat and add the olive oil. Add the garlic and cook 1 minute. Add the olives, red pepper flakes, and capers, and let that cook for 2 minutes, stirring often. Toss in the tomatoes with their juices and bring to a low simmer. Stir in the basil and season with salt and pepper. Simmer for 10 minutes. Remove from the heat and set aside.
Combine the bread crumbs, garlic powder, and oregano in a shallow bowl; season generously with salt and pepper and mix well. Crack 3 of the eggs into another shallow bowl; season with salt and pepper and beat with a fork to mix. Put the flour in another shallow bowl and season with salt and pepper. Arrange the eggplant, flour, beaten eggs, and bread crumbs on a work surface near the stove.
Heat about 1/4-inch olive oil in a large skillet over medium heat. When the oil is hot, dredge several eggplant slices first in the flour, then dip them in the egg, and finally coat them in the bread crumbs. Put as many eggplant in the skillet as will fit comfortably in a single layer and cook until tender and well browned on both sides. Drain on paper towels. Cook all of the eggplant slices this way, adding more olive oil to the pan as needed.
Stir together the ricotta and 1/2 cup of the Parmigiano cheese. Stir in the basil and remaining 2 eggs, and season with salt and pepper.
Preheat the oven to 350°.
To assemble the dish, first get yourself set up with a large, buttered baking dish. Have ready the eggplant, the ricotta mixture, the tomato sauce, the shredded mozzarella cheese and the remaining 3/4 cup grated Parmigiano. To start, spoon some of the tomato sauce over the bottom of the baking dish. Now add a layer of eggplant. Spread with half of the ricotta mixture. Spoon another layer of tomato sauce over and sprinkle with about one-third of the mozzarella. Repeat with a layer
of eggplant, the rest of the ricotta, tomato sauce, and another third of the mozzarella. Finish with the rest of the eggplant, the rest of the tomato sauce, and the rest of the mozzarella. Sprinkle with the 3/4 cup Parmigiano.
Put the dish in the oven and bake for about 1 hour, until golden and bubbling. Let stand for about 20 minutes before