I believe it is morally obligatory to provide shelter for the most needy in your community (defined broadly). This should be a right. It is impossible to live any kind of normal life without the guarantee of a bed and the capacity to prepare food for yourself.
However *type *and *location *of your choice should not be a right. If you are relying on society to provide you with basic needs you have to accept restrictions. These relate to value for money as well as moral hazard.