How long can savory cream cheese dishes last?
According to North Dakota State University, cream cheese, opened should last about two weeks between 32'f and 40'f. For the cheese itself, unopened, they recommend to "Use within one week of the 'best when purchased by' date". Unfortunately, in this situation, you cannot simply cut away the mold from the cheese since it is a mixed dish.

When you factor in the fact that the cheese was not only unwrapped, but heated along with other components, and likely sat out for some time on the counter in addition to in the pan, with added protein (the black beans especially), the math for how long cream cheese can last in your fridge shrinks and shrinks.

Personally, I would follow the cooked meat guidelines to be on the safe side. This means that well-wrapped leftovers, quickly taken out of the danger zone range of temps (40'f - 140'f), should last for 3-4 days after cooking.