Preheat the oven to 350 degrees.
Brown the beef and the onions in a large skillet over medium heat. Reduce the heat and add the chili powder, cumin, and chilies. Cook, stirring, for 5 to 10 minutes longer. Season with salt and pepper.
Grease a 13x9-inch dish and spread 6 tortillas on bottom. Pour the beef mixture, and then the beans over the tortillas. Cover with the remaining tortillas. Sprinkle the cheese evenly over the top. Pour the tomatoes over the cheese. Bake until the casserole begins to brown around the edges, about 1 hour.