Cut eggplants lengthwise into 3/4 to 1 inch thick slices.
Place a few slices in a colander and sprinkle with kosher salt.
Continue layering and salting until all eggplant slices are in the colander.
Place a plate that just covers the eggplant on top and weight it down with a heavy can.
Let eggplant drain in sink for 45 minutes to 1 hour.
Pat eggplant slices completely dry with paper towels.
While eggplant drains, heat 2 tablespoons olive oil in a heavy saucepan.
Add onion and cook until soft and translucent.
Add garlic and cook for an additional 1-2 minutes until fragrant.
Add tomatoes, salt, pepper, and red pepper flakes.
Cook over low heat until sauce thickens, about 30 minutes.
Stir in chopped basil and mix well.
Turn on oven broiler and place eggplant slices on a lightly greased baking sheet.
Lightly brush tops of eggplant with olive oil.
Broil until lightly browned on top.
Flip eggplant slices and broil until second side is browned.
Preheat oven to 350°F.
Spoon a thin layer of sauce to cover the bottom of a large baking pan.
Place a layer of eggplant slices side by side without overlapping.
Spoon sauce over each slice.
Sprinkle both grated cheeses over the sauced eggplant.
Repeat layering process with remaining ingredients.
Bake uncovered until bubbly and lightly browned, 35-40 minutes.