Preheat oven to 375℉. Grease an 8x8 baking dish with butter or oil.
Cook frozen broccoli according to package instructions. Once cooked, strain and chop into small pieces. Pour and spread evenly into the bottom of the prepared baking dish.
While broccoli cooks, in a large saucepan melt the butter over medium heat. Add the flour and cook, sitrring constantly, for 1-2 minutes to remove the raw taste. Whisk in the milk and continue to whisk to work out the lumps. Add the garlic powder, onion powder, salt, and pepper. Whisk until the sauce thickens.
Remove from the heat and stir in the mayonnaise.
In a small bowl whisk the eggs. Whisking constantly, add about ¼ cup of the hot mixture to the eggs to temper them. Pour the warmed eggs into the saucepan and whisk to combine.
Pour the mixture over the broccoli, ensuring to completely cover the broccoli. Top with shredded cheddar.
Bake until the center is set when the dish is gently nudged, 25-30 minutes. Let cool for 5 minutes before cutting and serving. Enjoy!