The elves are immortal by nature and it isn't Valinor that makes them immortal (they would have lived forever in Middle Earth, too, they just go to a nicer place to live). Likewise does it not cause the mortal hobbits to live forever. It is called the Undying Lands because only immortals live there and not the other way around.
But on the other hand, this Wikipedia site says:
...only immortal beings were allowed to reside there, but the land
itself, while blessed, did not cause mortals to live forever. Amongst
the exceptions to this were the surviving bearers of the One Ring —
Bilbo and Frodo Baggins and...
But the phrasing here is a bit unclear. It could be they were an exception to only immortals being allowed there, or they could be an exception to the fact that it didn't cause mortals to live forever.
It's been quite a long time since I read LotR and The Silmarillion, but I don't think Frodo and Bilbo were going to live forever. They just got a nice place to die.