Even so, it would still take money to erect a building
I'm not so sure about that.
It was implied that even in Archer's time the foundations and the first couple of floors of what was to become Picard's speech about the way future society works in First Contact were firmly in place, and that even if money or credits or whatever still existed in day to day life they weren't the driving force of the economy. By that point we had supposedly evolved both technologically and as a society in a way that if a building was
needed, it would have been
built.
Yes, but the resources still have to come from somewhere, and the people doing the labor still deserve to be compensated. We know, canonically, that Starfleet officers are paid for their service; therefore it stands to reason that the people who built a Starfleet building would not be working for free.
I'd really like to hear a name of any person under 40 and living that had a building named after them based solely on merit, if you'd care to provide one.
Who says it was solely on merit? Richard Daystrom made the biggest computer breakthrough of his age -- an age where money still exists and there are still ultra-rich individuals like Flint and Carter Winston. No doubt Daystrom was as loaded as Steve Jobs or Bill Gates, at least in proportion to the standards of the 23rd-century economy.
Perhaps, but since then no Star Trek show has had money.
But that doesn't mean the line in the movie was
meant to bring about that result. There was no such agenda behind it. It's just that the movies have had proportionally more impact on how
Star Trek is perceived than the TV series did -- which is why Kirk is perceived as a rule-breaking hothead even though the only time he ever really went rogue was in
The Search for Spock, and why there's a meme about Scotty having a reputation as a miracle worker even though that description was never used for him prior to TSFS.
That's all true, but all modern shows, even Enterprise, make it like money isn't really a thing, if it's there at all.
No, it wouldn't have been the overarching goal in life or the primary determinant of a person's perceived worth the way it is today, but that doesn't mean it wouldn't still play a functional role in the economy. It's just that people would've learned to see money as merely a means to an end rather than an end in itself. (Well, except for people like Harry Mudd who are trying to get rich by whatever means.)