Want to share a house with friends for twenty years and share childcare responsibilities? Great, have them sign an intent-to-lease agreement and take that to the mortgage company to help with qualification. Not having this kind of agreement can lead to all sorts of issues.
This should also extend to being jointly and severally liable for paying rent, not just mortgage. What happens when a tenant stops paying? If you've got joint and several liability, you basically have to pay the full amount while being unable to evict the deadbeat for nonpayment (since they're an owner or on the lease). It's slightly better in the case of the lease since you can negotiate a technical default and deadbeat-only eviction with your landlord, but it's still a mess that you should avoid if possible.
That all said, living in a house with friends is an excellent choice IMO. I think humans are built to have some non-blood relatives at that level of closeness and cooperation, and it seems good to raise a child with more than two adults that they interact with in their typical household setting.