I found it hard to believe that the Enterprise-D/Galaxy Class is considered "ancient" (Raffi's exact words) by the same organization that used the Miranda, Oberth, and Excelsior classes for over a century.
Depends what's on the inside. Real world example, the Ticonderoga-class cruisers in the US Navy (large air defense / surface ships) are finally started to retire. 27 were built, 17 are active (5 decommissioned just in the past year so it was 22 until recently). The 22 have been in service for 28 - 37 years depending on when they were built. However the prior 5, including the lead of the class the USS Ticonderoga, only served 18-20 years and were all retired by 2005. Why? Because the 22 have "Vertical Launch Systems" to fire their weapons and a very different internal arrangement, whereas the first 5 use old Twin-arm launchers as ships did from the 1950s until VLS showed up. In the 90s, the Navy decided to go all-VLS and even young ships without it were pulled from service early. Those first five could have easily served for another 20 years, but it was decided they were more useful as spare parts for the other 22.
Enterprise D was one of the earliest Galaxy class ships. It may have even been the second or third of the first six. And the ship design, while powerful, was clearly very poorly suited for the time it served in. After the Federation got licked at Wolf 359, the next fleet they built was smaller, faster, more tightly integrated designs. No families. Fewer amenities. During the Dominion War, the Federation leaned on a lot of upgraded 23rd century designs and their post-Wolf 359 "battle fleet". And 2380 and 2390s, they visually continued the approach that began with the battle fleet of smaller, heavily armed ships, though closer to 2400, they moved away from tight integration in design and into late 23rd century style modularity (really good choice if you want to build a big fleet fast).
As a matter of hull age, the Galaxy class wasn't that old. But if it wasn't kept upgraded or modernized to "Ross Class" standards (from STO, canonized in Season 2) it was dated by the late 2380s.
In fact we can infer this in one more respect. The Odyssey-class, namely the Enterprise-F. It is having a very short life too. And at Frontier Day, there are only two of the class, so it wasn't a big run of ships, despite the Federation building a lot of every other class (even Sovereigns, which by 2402, there are so many of, it is clearly a very successful design that's lasted). The Odyssey is the biggest ship the Federation had ever built to that point, and really represents trying to merge Galaxy and Sovereign techs in a way that, while potent, was clearly not something the Federation saw value in refurbishing. That makes that class every bit the dead end that the Galaxy class was. Or the Intrepid-clas sfor that matter, of which we know there are only 3 of (Intrepid, Voyager, Bellpheron). Notably, at Frontier Day, while we saw plenty of other Battle of Sector 001 ships, we saw zero Intrepids.
In my head canon, I always figured Intrepid was the Starfleet equivalent of the real world Zumwalt-class. The Federation was going to put upgraded Galaxy tech in a smaller package as the new cruiser class that would be the fleet backbone, but the defense-centric priorities post-Wolf 359 forced a change of plans towards a more warship-style design. So Intrepid production ended at 3, as focus shifted to Sabers, Akiras, Steamrunners, Norway and of course, Sovereigns. Of course, Voyager more than proved itself capable of intense fighting. But it is much more of the Galaxy lineage than the Battle of Sector 001 lineage.
So if Starfleet figured there wasn't value in upgrading the internals of the "Galaxy line" of Galaxy-Intrepid-Odyssey, then hull life wouldn't matter much. ,