In a medium frying pan, sauté onion until translucent, for about 4 minutes. Add corn and cook until brown on one side, for approximately another 4 minutes. Add cream cheese and stir to combine. Season with salt and pepper to taste. Stir in cilantro and set aside.
Stir together the black beans, and Pico de Gallo in a medium bowl.
Arrange the ingredients in layers in a 9-inch deep-dish pie pan: 4 Casa Mendosa® tortilla halves to cover, followed by one-third of the bean mixture, one-third of the corn and ¼ cup of the Monterey Jack cheese. Repeat twice more, while packing down the layers. Sprinkle with the remaining ¼ cup shredded cheese, Cotija cheese, and chili powder.
Preheat the oven to 375°F. Cover the baking dish with aluminum foil and cook for approximately 15 – 20 minutes, until heated through and the cheese is melted. Remove foil, and if desired, set oven to broil to brown the cheese on top.
Let stand 10 minutes, slice into wedges and serve with lime if desired.