Peel and cut eggplant into 1/2 inch thick slices. Sprinkle eggplant slices with 1/2 teaspoon of the salt. Stack them vertically in a colander, or lay them out on paper towels to drain. If they're laid on paper towels, they should be turned once in a while. Let stand for 30 minutes and then blot dry with clean paper towels. Meanwhile, position the rack in the center of the oven and preheat the oven 400 degrees Fahrenheit.
Rub 2 tablespoons of olive oil into the eggplant slices, place them on a lipped baking sheet to catch any drips, and bake for 15 minutes. Turn and bake for about 15 additional minutes, or until lightly browned. Remove from the oven and set aside; reduce oven temperature to 350 degrees.
Heat a medium skillet over medium heat. Swirl in the remaining 1 tablespoon of olive oil, then add the onion (diced) and soften for 2 minutes, stirring frequently. Stir in the minced garlic, oregano, basil, pepper and the remaining ½ teaspoon salt. Cook for 30 seconds, stirring constantly; then raise the heat to medium-high, pour in the tomatoes with their juice, and bring the sauce to a simmer. Cover, reduced the heat to low, and simmer for 20 minutes, until thickened. The dish can be made in advance up to this point. Cover the eggplant slices and the sauce and refrigerate separately for up to 24 hours; allow both to come back to room temperature before proceeding with the dish.
Layer the following in this order in a 6-cup casserole dish or an 8-inch square baking pan; one-third of the tomato sauce, half the eggplant slices, half the cheese slices, 1/8 teaspoon grated nutmeg, half of the remaining tomato sauce, the remaining eggplant slices, the remaining cheese shavings, and the remaining tomato sauce. You may have to cut the eggplant slices to make them fit in one layer, or you may have to overlap them a bit.
Bake for 30 minutes, or until thickened and bubbly. Let stand at room temperature for 5 minutes before serving.