Heat the oven to 375°F and grease a 9-by-13-inch baking dish.
Mash 1 cup black beans with 1/2 cup enchilada sauce, salt and pepper, then stir in the remaining beans and corn.
Spread 1/2 cup sauce in the dish and arrange 4 tortillas over it, tearing them as needed to cover the bottom.
Layer half the bean mixture, 1/2 cup cheese, 4 tortillas and 1/2 cup sauce, then repeat the bean and cheese layers.
Finish with the remaining tortillas, sauce and cheese and cover with foil.
Bake for 20 minutes, uncover and bake for 10 to 15 minutes more, until the middle bubbles steadily.
Rest for 10 minutes before cutting into squares.