Arrange a rack in the center of the oven and preheat to 400 degrees F. Grease 9-by-13-inch baking dish with 1 tablespoon of the butter. Set aside.
Heat the olive oil and the remaining 1 tablespoon butter in a large nonstick skillet over medium heat. Cook the onions until softened, about 2 minutes. Add the red pepper flakes and garlic and cook until fragrant, about 1 minute. Add the corn and lima beans and cook until warmed through, about 2 minutes. Season with the salt and pepper. Add the tomatoes and vinegar and stir.
Whisk together the vinegar and flour in a small bowl and pour into the pan. Stir to combine.
Whisk together the eggs, half-and-half and basil in a medium bowl. Remove the skillet with the vegetables from the heat, then stir in the egg mixture. Transfer the creamy vegetable mixture to the prepared baking dish.
Combine the breadcrumbs, Gruyere and Parmesan in a small bowl and sprinkle on top of the vegetable mixture. Bake in the center of the oven until the top starts to look golden on top, about 15 minutes. Let cool for 5 minutes before serving.