Preheat oven to 400º F and lightly grease an 8×8-inch baking dish with butter or non-stick spray.
Place broccoli on a baking sheet and drizzle olive oil over it, then season generously with salt and pepper.
Toss together, then place in oven and roast for 15-20 minutes, or until semi-softened.
In a large bowl, whisk together egg, heavy cream, garlic powder, onion powder and red pepper flakes (if using), then stir in cheeses.
Remove broccoli from oven and transfer to baking dish. Add 3/4 bacon to the baking dish, then pour cheese mixture over the top and stir everything together. Top with chopped fried onions remaining bacon.
Reduce oven temperature to 350º F, return baking dish to oven and bake for 20-25 minutes, or until cheese is bubbly and just set.
Remove from oven and let cool 5 minutes before serving.