Preheat the oven to 350°F.
Grease a 9x13-inch baking dish with cooking spray or butter.
Spread the thawed hashbrowns evenly in the bottom of the dish.
Layer the cooked sausage evenly over the hashbrowns.
Add the optional diced onions, bell peppers, or spinach if using.
Sprinkle the shredded cheddar cheese evenly over the top.
In a mixing bowl, whisk together the eggs, milk, salt, and black pepper until fully combined.
Slowly pour the egg mixture over the casserole, making sure it covers everything evenly.
Place the casserole in the oven and bake uncovered for 45 to 50 minutes, or until the center is set.
Remove from the oven and let it rest for 5 to 10 minutes before slicing and serving.