This assertion makes no sense. Barcelona is covered by an excelent public transportation network, including national, regional, and commuter railway services right in the city center, and there are entire blocks that are still unocuppied or including vacant old warehouses.
Barcelona's main problem is its populist government that uses anti-tourism political stunts to cater to radical socialist and anarchist pressure groups while screwing with the local's lives.
This sad political state of affairs only serves the interests of incumbent hotel operators and real estate speculators by ensuring that their past investments remain exceptionally proffitable and no competitor can enter the market to pick up the slack. Radical anti-tourism anarchist groups play the role of useful idiots to help preserve this state of affairs, but the real source of the problem is quite obvious, and so is the solution: allow the construction of new high-capacity hotels and provide incentives to maximize hotel occupancy, such as taxing vacant hotel rooms, so that repurposing apartments as pseudo-hotel rooms ceases to be an attractive investment.
Until this problem is actually understood, instead of blindly swallowing political propaganda, it won't simply go away,no matter how much noise and publicity stunts anarchist groups make regarding this issue.
Such a dream will likely have to remain deferred, however, because obviously no such technologies exist.
In theory, hotels should have a significant advantage over Airbnb. They can leverage economies of scale and are usually located in more tourist oriented areas of the city. I think the issue was that sort of like taxis hotels operated in a closed market and were competing against other hotels - sure motels existed but they were on the total other end of the cost-quality spectrum. They invested in fancy bars, and other stuff most people don't care about.
Then, Airbnb comes along and now you could pay a fraction of the cost of a hotel and have much better lodgings. It's worth scrutiny to see what percentage of Airbnb listings are operated full time vs. actually operating them in a sharing-econony fashion. But at a fundamental level, if Airbnb is growing so much we also need to examine why standard hotels aren't working.