It has been a very long time since a nobility title meant a legal claim to the land. For example, some Arthur Wellesley guy was:
Duke and Marquess of Wellington
Prince of Waterloo, of the Kingdom of the Netherlands,
Duke of Ciudad Rodrigo (Spain)
Duke of the Victory (from Portugal, but where exactly is "The Victory"?) and Marques of Torres Vedras
among other things, yet he had no rights over those lands.
Now, some of the titles in the question are different in that they are royal titles, but that does not change much of its importance.
For example, the "King of Jerusalem" title just is an inheritance from the old Crusader Kingdom of Jerusalem, that for most of its existence did not even control Jerusalem1.
But the descendants of the rulers could claim to be of royal blood, which at the time was important, and when they married in some royal family allowd their offspring to claim that both their parents were Kings, so the title was "bundled" with the others and passed on despite its lack of any associated country2.
And well, given that tradition is one of the cornerstones of Monarchy, it is far from strange that titles were kept, whatever their real applications3. With enough time, it was more work cancelling the title4 than just silently passing them forward.
UPDATE: Just two more points to illustrate the main argument
The Spanish Constitution stablishes (Title II, article 56, point 2):
His title [of the King] is that of King of Spain and he will be able to use the other titles owned by the Crown.
reinforcing the idea these titles are used just because they were traditionally bundled together with the title of King of Spain.
Also, other points of the Constitution explain that the King actions are binding only if they are validated by the Government or the Parliament, thus making any possible claim from the King basically wet paper.
If the titles were to be a legal basis for anything, the most affected country would be... Spain. And not only because of the issues at an international level, but also because a lot of the titles identify the King of Spain as King of several kingdoms that are now part of Spain. So, if the titles could be interpreted that way, people in Galicia5 could claim that the existence of a separate "King of Galicia" title meant that Galicia is not part of Spain.
The fact that these title are kept and allowed by the Spanish Constitution and that the argument of the existence of a "Kingdom of Galicia" is not made is a strong signal that these titles are not to be taken as claims.
1As another example, the Holy Roman Empire was not very "Roman".
2Or you could view it as the title as a "true" title granting all of the rights over all the assets of the Kingdom of Jerusalem, but with that Kingdom having no assets at all. As if your Uncle Bob left you as inheritance a bank account with no balance.
3And of course, for some time it was useful to have some title in case it could be used to justify a casus belli or other action, should it be convenient. Or it could even be passed to a distant relative to pave the way to another royal wedding.
4"What is he doing that now, if the title has been associated with the Crown for so many centuries? Do we need to worry about something?"
5Or Valencia, Canary Islands, Navarra, Toledo, Granada, Malloca... the list is long.
Usually claiming titles falsely are regarded as illegal (e.g. claiming to be a Dr. med.)
That's more of a legal issue, and (at least in the United States), usually isn't. What's universally illegal is falsely claiming government authority, or attempting to profit from a falsely claimed title (which would be fraud).