1. Preheat the oven to 400 degrees F. Spray a 9-inch round cake pan, springform pan, or baking dish with nonstick cooking spray.
2. Heat the oil in a large skillet over medium heat. Add the onion, cumin, chili powder, and garlic and cook until you can smell the spices and the onion is softened, about 3 minutes. Stir in the tomatoes with the 1/3 cup of reserved juice and the tomato paste, then stir in the beans. Season with salt and pepper to taste. Let the bean mixture simmer until everything is hot, about 3 minutes. Add the corn and spinach and stir until the spinach has wilted and everything is well blended and hot, about 3 minutes. Taste for seasonings, adding more salt and/or pepper as necessary.
3. Place 1 tortilla in the prepared cake pan. Spread one fourth of the bean and vegetable mixture evenly over the tortilla, then sprinkle 1/2 cup of the shredded cheese evenly over the top. Repeat with 3 more layers, ending with the last quarter of the bean mixture and then the last 1/2 cup of shredded cheese.
4. Bake the tortilla casserole until it is hot throughout and the top is lightly browned, about 20 minutes. Let the casserole sit for about 5 minutes, then cut it into wedges using a sharp knife and serve it with a spatula or better yet a pie server. Sprinkle the top with cilantro, if desired, and serve with sour cream and/or salsa on the side, if you like.