It should not be illegal for such housing to exist.
I think a dormitory or barracks style housing is perfectly acceptable as a solution but putting the burden of supplying bathrooms on private businesses or implicitly requiring people shit in buckets in their one and only room is not.
I might feel that a gigabit fiber connection is necessary to maintain basic human dignity ;-) but I don't think that should be enforced via law. One should be able to opt out for something more afforable.
> I'm reasonably sure we can meet housing needs and still maintain basic human dignity.
The proof of your hope would be in the pudding, and right now we have no pudding.
For the person living in it, yes. For other people living in the area, bringing in a large number of people who are just one step above living in a tent, may have impacts on the neighborhood that they don't want. Much of the resistance to building more housing is this at various different levels.