Line a large rimmed baking sheet with heavy duty aluminum foil. Lay bacon on the prepared pan.
Bake at 400 degrees for about 10 minutes just until tender-crisp. You don't want it crisp, it will cook more when you bake the casserole.
Allow bacon cool on baking sheet and remove to a paper towel-lined plate to absorb any excess grease.
In a skillet, melt butter and add in onion. Cook until translucent and set aside.
Grease a 9x13 baking dish, place hashbrowns in the dish and then top with the cooked onion.
Sprinkle with salt and pepper.
Crumble bacon and spread over the casserole. Sprinkle with 1 cup of the cheese.
In a large bowl, whisk eggs and milk together. Pour over casserole and then top with remaining cup of cheddar cheese.
Cover pan with aluminum foil and refrigerate overnight.
In the morning, let the casserole sit on the counter 30 minutes before baking.
Preheat oven to 400 degrees.
Bake casserole, covered, for about 45 minutes. Uncover, and continue cooking for about 15 minutes longer or until casserole is set. Insert a knife in the center to check for doneness. Serves 12.