Preheat oven to 250°F.
Arrange chile pods on a cookie sheet and roast for 20 minutes. Flip chiles halfway through the roasting process. Remove, and increase oven heat to 350°F.
After the chiles have cooled to touch, remove stems and seeds. Add chiles and onion to a large saucepan and cover with water. (Use at least 2 1/2 cups, as you will need 2 cups of the chile-infused water for blending.) Bring to a boil, then reduce heat, cover, and simmer for 10 minutes.
Carefully remove chiles and onion from the pot with a slotted spoon and add to the blender. Add 2 cups chile water and remaining ingredients and blend until smooth.
While the chiles roast, clean and remove stems from chard. Dice stems and onions, and roughly chop chard leaves, keeping them separate. In a large, deep skillet, heat 2 tablespoons of oil over high heat and sauté onions and stems until softened. Reduce heat to medium and add chard leaves to the onion-and-stem mix; cover to steam until bright in color and just softened.
Pour chile sauce over chard and simmer on medium-low heat, allowing water to evaporate and sauce to thicken slightly.
Over medium-high heat in a small skillet, heat a few tablespoons of oil. Fry each tortilla for about 30 seconds on each side.
In a 9x12-inch casserole dish, layer 4 corn tortillas, cover with 1/3 of the chard-and-chile mixture and then 1/3 of the grated cheese (omit or halve the cheese if desired). Repeat until you have 3 layers, and bake in the oven for about 10–15 minutes or until the cheese bubbles.