Preheat your oven to 375°F (190°C).
In a large skillet, heat the vegetable oil over medium heat.
Add the chopped onion and minced garlic, and cook until the onion is soft and translucent, stirring occasionally.
While the onions cook, grease a 2-quart rectangular baking dish. Create your first layer by spreading half of the tortilla pieces across the bottom.
Top evenly with half of the shredded cheese and one can of the undrained green chiles.
Sprinkle the cooked onion and garlic mixture over the top.
Create the second layer by topping with the remaining tortilla pieces, the rest of the cheese, and the second can of green chiles.
In a large bowl, whisk together the lightly beaten eggs, buttermilk, salt, black pepper, cumin, and crushed oregano until well combined. Gently and evenly pour this custard mixture over the layers in the baking dish.
Bake uncovered for 35 to 40 minutes. The casserole is done when the center is set (a knife inserted near the center comes out clean) and the edges are bubbly and lightly browned.
Let the casserole stand for 15 minutes before slicing and serving. This allows it to set up perfectly.
Top with fresh salsa, if desired.