Preheat oven to 350 degrees. Prepare an 8x10 inch glass casserole baking dish by spraying it with cooking spray.
Start off by heating a small cast iron skillet with olive oil. While the skillet is heating up, dice up the onion into small pieces and sauté it until the onions are translucent, stirring occasionally. Cook meat if necessary.
As the onions sauté, prepare the egg mixture. In a large bowl, combine the eggs, milk, salt, and black pepper. Whisk together well.
Once the onions and egg mixture have been prepared, shred your cheese followed by your potatoes (if not using frozen hash browns). You want to shred the potatoes last, so they do not start to turn brown.
Layer ingredients in casserole dish, in the following order: hashbrowns, onion, cheese, meat, and egg mixture.
Bake time will depend on your oven, but mine usually takes 30 - 35 minutes. You will know when it's done if the center is set, and edges are starting to turn golden brown.
Sprinkle additional cheese on top of the casserole, if desired, during last 5 minutes of bake time.