These gardens are usually owned by a consortium / registered association. Anybody can become a member and I believe that the gardens can indeed be passed on within the family, depending on the rules of the specific consortium (most will allow this). Those rules will also define the proportions of flowers / vegetables / lawn asf that you must grow and maintain, to make sure people actually do garden work there instead of just using it as a hangout on a patch of grass.
Aside from the membership, garden users will pay some fee for collective expenses so it´s basically like owning your share of the consortium but still paying a lease. If If you do not have relatives with a garden, obtaining your own will depend on how sought-after the gardens are. Some have waiting lists, some not.
Today, they are popular in cities, in areas with a lot of industry (= crave for nature) or close to attractive recreational assets such as river/sea, forest asf. There will surely be waiting lists for those gardens. Others (small towns, shrinking cities, areas where most people have a garden at their house...) may actually have problems attracting new members and even offer the first year of gardening free of charge. I lived next to a garden colony some years ago, and found that russian, polish and turkish immigrants would fill the gap there. A bit more noisy than the natives, but very skilled gardeners.
Now in the past, those gardens where even more popular, not only as a getaway but simply for feeding the family. Every inch of soil was used to grow vegetables, plant fruit trees, some had cages for feeding up rabbits or ducks, maybe a hen or two for eggs...of course it was recreational as well, but primarily they where small farms. My grandmother grew up poor during the great depression, with seven brothers and sisters and an unemployed dad, and told me that their garden was a crucial source of food for their family. Back then, there would definately have been a waiting list, and even more so in wartime when people where underfed and/or without shelter.
Actually, I sometimes wonder why those gardens are not more popular today, because one would expect them to be for example for unemployed people. Great way to get cheap quality time with your kids, plus you get rewarded your own fresh food. Seems that people are not like my Grandma anymore...