You can contribute voluntarily to charities to help people pay medical debt, to charities that provide free medical assistance or there could be free/less expensive medical treatment given by universities as training to medical students
A priori, you don't know if someone won't be able to pay for treatment, so there's no reason someone should be left to die
The important part is that things should be voluntary and not forced