Heat sherry and olive oil in a large skillet over medium-high heat until bubbling. Add shallot, garlic, and red pepper flakes. Saute until fragrant, about 2 minutes. Add eggplant, zucchini, and red bell pepper. Saute, stirring frequently, until pepper is soft, 8 to 10 minutes. Remove from heat. Add basil, salt, and pepper.
Melt margarine in a saucepan over medium heat. Add flour; season with salt and pepper. Whisk rapidly until smooth, about 1 minute. Add milk. Bring to a boil; stir until thickened, about 2 minutes. Reduce heat to medium-low. Add 1/4 cup cheese blend and stir until melted. Toss eggplant mixture in the cheese sauce; transfer to a nonstick baking pan.
Bake in the preheated oven for 15 minutes. Top evenly with remaining 3/4 cup cheese blend; continue baking until set, about 15 minutes more.