Heat oven to 425°F. Toss sweet potatoes with olive oil, chili powder and cumin. Spread on a sheet pan and roast for 20 minutes, turning once, until nearly tender. Reduce oven to 375°F.
Stir black beans, corn and onion together in a bowl. Spread 1/3 cup enchilada sauce in a 9-by-13-inch baking dish.
Arrange a layer of tortilla pieces over the sauce. Add half the roasted sweet potatoes and half the bean mixture. Spoon over about 1/3 of the remaining sauce and sprinkle with 1/2 cup cheese.
Repeat the layers, finishing with tortillas, remaining sauce and cheese. Cover with foil and bake for 20 minutes. Uncover and bake another 10 to 15 minutes, until bubbling at the edges.
Rest for 10 minutes before cutting. Finish with cilantro and serve with lime wedges.