Heat 2 tablespoons oil in a 12-inch heavy skillet over medium-high heat, then cook garlic and red-pepper flakes, stirring, 30 seconds. Add tomatoes and salt and cook, stirring for about 6-8 minutes, until thickened. Remove from heat and stir in basil and parmesan.
Prepare grill for direct-heat cooking over medium-high heat.
Trim 1/4 inch off both ends of each eggplant. Cut each eggplant lengthwise into slices. Brush slices with remaining 2 tablespoons oil.
Grill eggplant, covered, turning over once, until tender, about 6 minutes total. Transfer to a work surface.
Spread top of each slice with about 1 tablespoon tomato sauce and top with a slice of mozzarella. Transfer to a shallow baking pan and grill, covered, just until cheese is melted, about 4 minutes.