At least in our local shelter, the animal will get basic veterinary care. I've known people who've taken on pets they can't afford, and when they do that they're really gambling with that pet's welfare. There was a cat I knew who died in agony due to a twisted/blocked intestine, because the family couldn't afford to take him to a vet, didn't want to surrender him to a shelter, and decided to just cross their fingers and hope he got better on his own.
It was not kind or humane. A shelter would have put him down and saved him a lot of pain. No creature deserves to die like that.
While I recognize that fortunes change, I feel very strongly that it's highly irresponsible to take on the responsibility of a pet (or a child, for that matter), knowing ahead of time that you cannot provide for them.
Besides, if you want to help save animals and can't afford the long term costs of owning one, you can still volunteer at the shelter or foster animals in your home. That would be the more ethical approach, by far.