Preheat the oven to 375°F. Spray a 9x13-inch baking dish with nonstick cooking spray.
Heat the olive oil in a large skillet over medium-high heat.
Add the diced onion and cook for 2–3 minutes, until softened and translucent.
Add the sliced mushrooms and diced red and green bell peppers. Cook for 4–5 minutes, stirring occasionally, until the vegetables are tender and the mushrooms begin to brown.
Season the vegetables with the salt and black pepper. Stir in the minced garlic and chopped spinach. Cook for 1–2 minutes, until the spinach is wilted. Remove the skillet from the heat.
Spread the thawed shredded hash browns evenly in the bottom of the prepared baking dish. Spoon the cooked vegetable mixture evenly over the hash browns.
In a large bowl, whisk together the eggs and milk until well combined. Pour the egg mixture evenly over the vegetables and hash browns.
Bake for 35–40 minutes, or until the eggs are set and the edges are lightly golden.
Sprinkle the mozzarella and cheddar cheese evenly over the casserole. Return to the oven and bake for another 5–10 minutes, until the cheese is melted.
Remove the casserole from the oven and let it rest for 10–15 minutes before slicing.