....somebody says it would be immoral to let him die?
You take a complex position and simplify it to the extreme. In my faith, this has been received significant theological analysis. It is not considered objectionable to withhold extraordinary medical measures but this does not mean withholding sustenance.
In my case, two days after the medical professionals were asking if they should remove the feeding tube from her, they were demanding that I find a nursing home bed for my coma-recovered mother. She lived six months longer. Apparently the medical judgement was wrong and Someone Else’s judgement prevailed.
With the coming of the all powerful state especially government-run (in other words rationed) health care, the difficult scenario you describe will not be the typical one. All us Proles will be advised of our duty to die expeditiously and economically, sometimes when life might be possible. If the government is not on the side of life reflecting our judeo-christian heritage, then what other side is there?