5 tablespoons olive oil
1 1/2 pounds eggplant (about 1 large), peeled and cut into 1/2-inch cubes
2 medium onions, chopped fine
4 large garlic cloves, minced
1/4 teaspoon dried hot red pepper flakes
1 red bell pepper, cut into 1/2-inch pieces
1 yellow bell pepper, cut into 1/2-inch pieces
1 green bell pepper, cut into 1/2-inch pieces
1 pound vine-ripened tomatoes, seeded and chopped fine, or a 28-ounce can whole tomatoes, drained and chopped fine
1 cup cooked chick-peas, rinsed and drained if canned
2/3 cup packed fresh basil leaves, washed well, spun dry, and chopped
2/3 cup packed fresh parsley leaves, washed well, spun dry, and chopped
1/4 teaspoon ground allspice
freshly ground black pepper to taste
For cheese custard
1/2 stick (1/4 cup) unsalted butter
1/3 cup all-purpose flour
2 cups milk
1/2 cup freshly Parmesan (about 2 ounces)
3 large egg yolks
In a 12-inch non-stick skillet heat 2 tablespoons oil over moderate heat until hot but not smoking and cook half of eggplant, stirring frequently, until golden brown and tender, about 6 minutes. Transfer cooked eggplant to a 2- to 2 1/2-quart gratin dish or other shallow baking dish. Cook remaining eggplant in 2 tablespoons oil in same manner and add to dish.
In skillet cook onions, garlic, and red pepper flakes in remaining tablespoon oil over moderately low heat, stirring, until onions are softened. Add bell peppers and cook over moderate heat, stirring occasionally, until tender, about 8 minutes. Stir in remaining ratatouille ingredients and simmer, stirring occasionally, 5 minutes. Season mixture with salt and additional pepper and spoon evenly over eggplant.
Preheat oven to 375°F.
Make cheese custard:
In a 1 1/2-quart heavy saucepan melt butter over moderately low heat and whisk in flour. Cook roux, whisking, 3 minutes and whisk in milk in a stream and salt and pepper to taste. Bring sauce to boil, whisking constantly, and simmer, whisking, 2 minutes. Stir in Parmesan and remove pan from heat. In a heatproof bowl whisk yolks together and whisk in about one fourth of sauce. Whisk yolk mixture into remaining sauce.
Spoon custard over ratatouille. Ratatouille may be prepared up to this point 4 hours ahead and chilled, covered.
Bake ratatouille in middle of oven 45 minutes, or until custard is lightly browned. Cool ratatouille 10 minutes before serving.
Serves 4 to 6 as a main course or 8 as a side dish.