Preheat oven to 375 degrees F. Slice mushrooms, chop peppers, rinse and chop leeks, and cut off broccoli florets. Whisk eggs with milk and set aside.
In a large skillet over medium heat, add olive oil along with mushrooms, peppers, leeks, broccoli, and carrots. Cook for 6-7 minutes until veggies soften and mushrooms release their liquid.
Add in shredded potatoes and corn to the skillet and cook for a few more minutes. Season with salt and pepper.
Spread the veggies out in a 9×13 baking dish and dot with pesto. Then pour in egg mixture and spread it around so the eggs are even. Season with salt and pepper.
Bake the casserole for 40-45 minutes until eggs are puffed and cooked through and edges are browned a bit.
Cool the casserole for a few minutes, slice, and serve with hot sauce!