Here in Switzerland there is training for "Sterbebegleitung" Accompaniment of the dying. This is a practise here that comes from volunteers in the church, the clergy themselves, and health care workers.
It is all in German, but here are three links to different organisations' training: the first is from the catholic church training lay people, the second is provided by a service provider for assistance to those who are no longer able to live independently but want to stay at home; the third is from a hospital.
We have found that older people discussing this idea are most concerned with the chemistry between potential house mates and so most often develop the idea with people they already know. Most people are not interested in having interpersonal problems in their last years causing more stress with moving etc. The idea is to move one last time!
Of course, the idea of bringing people together for those who do not have such friends is also important. Perhaps it requires a "matching" service like for dating.
I am sure that a contractual arrangement is important, but not as the basis for the relationship. Your last living situation is a very personal, intimate thing.
The website link I posted is from an organisation called Prosenectute, which does a lot of work to network older people through activities and contact. I do not know a whole lot about it, but I could imagine that just providing guidelines/consulting for creating shared living situations would be enough when an organisation that serves older adults already exists.