Preheat the oven to 375 degrees and grease a 9-inch by 13-inch baking dish with nonstick cooking spray.
Cook the ground beef and onions in a saucepan on medium heat. Drain the grease.
Next, add the green chiles, taco seasoning, and refried beans and mix.
Pour part of the red enchilada sauce into the bottom of the casserole dish.
Top with a little bit of ground beef mixture and spread it out.
Line the pan with pieces of flour tortilla.
Spread some more enchilada sauce and ground beef mixture over the top of the tortillas.
Sprinkle a handful of shredded cheese over the meat mixture and repeat two to three more times, and end with cheese sprinkled on top.
Bake for 20-25 minutes, uncovered, or until the entire dish is hot and serve.