To be honest, Rome was an unusually large town for medieval Europe- a population of thirty to forty thousand is pretty notable, and is matched by few other places.
You can probably avoid the Sack of Rome (and certainly the more serious damage that went on during the war of reconquest in the 540s), I would say, but that doesn't mean Rome will continue to flourish as a mega-city, due to its dependence on grain imports from Africa and Sicily, which will obviously cease without the Western Empire in one piece. That said, Rome will still retain its aqueducts for a while longer, which would certainly help things.
A good model would probably be Constantinople in its seventh century transition from a "Roman" to a "Byzantine" city. The grain dole and aqueducts were cut off, causing a population crash, so that the City in 700 had a population that was probably at best only about a third of what it was in 600. But even if a lot was lost, a lot clearly remained, and areas like the Hippodrome and the Forums continued to be areas of imperial ceremonial. Rome in this scenario could turn out similar, although obviously with the Pope replacing the role played in Constantinople by the Emperor.