You can decide if it’s worth restoring, but I was given a couple of free bikes and after spending money trying to restore them, I sold them to the scrap yard (you’ll get about 80nt for this).
Reason was the bearing was suspect, the deraileur did not work, and when I got it to work it was very hard to use, and the chain behaved weirdly even when a new one was installed. The amount of money you’d have to spend to get it working safely is just too much. Youbike is really cheap to use, and if you have the 1280 ticket they are free to use (included in the price of the 1280 ticket). Having an unstable drive system, and deraileur that acted weird was a safety issue in my book, so I gave up on it.
So you can decide if it’s worth it, and I’m sure these aren’t excessively expensive bikes if you allowed it to sit on a balcony for 5 years. Probably all the sprockets, bearing, etc. all needed replacing and you really do not want to go into how much it costs to get it replaced. You could just buy a new bike for the cost.