1 tablespoon vegetable oil
1 small onion, diced
2 medium russet potatoes (about 1 pound), peeled and grated on the large holes of a box grater
4 to 5 medium roasted Hatch chiles, seeded and chopped (see Recipe Note)
1 cup shredded Monterey Jack cheese
10 large eggs
1 cup whole or 2% milk
1 cup sour cream
1/2 cup fresh cilantro, chopped
1 teaspoon kosher salt, divided
For serving: sour cream, sliced avocado, fresh cilantro
Arrange a rack in the middle of the oven and heat to 375°F. Lightly grease a 9x13-inch baking dish with cooking spray or oil.
Heat the oil in a large frying pan over medium heat until shimmering. Add the onion and cook, stirring frequently, until softened, about 5 minutes. Stir in the potatoes and chiles, and season with 1/2 teaspoon of the salt. Transfer the mixture to the baking dish and spread into an even layer. Top with the cheese.
Beat the eggs in a large bowl and whisk in the milk, sour cream, cilantro, and remaining 1/2 teaspoon salt. Pour over the vegetable mixture.
Bake until the top is light golden-brown and a knife inserted in the middle comes out clean, about 45 minutes. Let cool for 5 minutes before slicing and serving hot.