Do you "retire" a whole class? Or just stop building 'em and retire ship by ship?
This.
Just rewatched ST VI, and there's a few factors in play there we can learn from.
1. Relative size. You can see just how much bigger the Excelsior is compared to the Enterprise-A. And we all know how much bigger a Galaxy is than an Excelsior. So we can see the Connie was too small to be a heavy cruiser any more.
2. Retirement. They headed back to be decommissioned, but lets take a look at the level of damage they'd taken. There was a giant hole in the saucer section where a torpedo went in the bottom and out the top. Thats a huge deal to repair.
In light of all this it seems the Connie went from a heavy cruiser to a light cruiser, and the logical progression from there is destroyer, then frigate, then fleet support ship. Since the first Connie was 2240 (according to memory alpha), and the Connie refits showed up in the 2270s, that means they have about a hundred years of service if we assume they lived into TNG like the Miranda.