I was asking if Rome was ever underpopulated in the medieval ages.
Certainly underpopulated, though never abandoned.
Despite the late classical sacks of Rome and the ravages of the Gothic and Lombard Wars, Rome maintained some semblance of the old civic life centered on the Forum. Many of the city's old structures suffered the greatest damage not from the sacks, but from the earthquake of 847 (before which the Basilica of Constantine and the Colosseum itself were essentially intact).
Even afterwards, the Forum continued to be in use; the OP is correct about it being turned into cattle pasture, but this didn't actually happen until the Normans under Robert Guiscard sacked Rome in 1084. After this, the surviving population concentrated in the Field of Mars, and the Forum - along with most of the rest of the city - was given over to agriculture or waste. We tend to think of Rome falling along with the Western Empire and beginning its recovery thereafter, but Rome as a city hit rock bottom not in the 5th or 6th centuries, but in the 11th. Rome had been in better condition after Alaric, Gaiseric, and Totila than it was after Guiscard.
By then, however, Rome had been firmly established as the spiritual capital of Christendom. Though the city itself was in a shambles, it was never going to be totally abandoned or reduced to complete obscurity, even though it had lost all economic significance aside from what we would today call "religious tourism."
I think any abandonment of Rome in the Christian era is difficult to imagine, but Muslim control/disruption of Italy is probably the most credible scenario. The Vatican itself was burned by "Saracens" in 846 (it was, at that time, outside the city walls), only one year before the disastrous earthquake of 847. In 849 a large Saracen fleet was crushed at the Battle of Ostia by a Papal-led maritime league. It's possible to imagine a different outcome of these years - the incursion of 846 is much stronger and actually penetrates the Roman walls (which were indefensible anyway), and/or Ostia is won by the Saracens, leaving Rome open to yet another sack. (Ostia was only lost by the Saracens because of a storm, so all you need to do is change the day's weather.) It's not inconceivable that this pile of disasters in the 840s could lead to the Pope deciding that some other city - any city, really - would be vastly preferable to Rome.