What I think the assumptions you are making are-
People enter NH only if they are unable to care for themselves.
People do not want to be there.
Many old People are at the very end of their lives, are DNR so is it worth it to intervene?
Having rounded Nursing homes early in my career, cared for the elderly for a few decades and now teaching in nursing homes I struggle with a lot of that.
Many, many people who are admitted do not belong there. They would be able to stay at home with minimal assistance. They end up admitted because insurance does not pay for assistance in the home. If they try without assistance it leads to falls and other events that are completely preventable. Most developed countries, other than our backwater one, provide for this assistance and keep people in their homes way longer and cheaper. We are stupid, let people get in big trouble and then admit them to an expensive place and then they can't go home because insurance won't pay for help.
Not everyone doesn't want to be there. Some people self admit or are admitted after a fall and decide to stay because they have no assistance at home (for stuff like meals, organizing meds, etc). Again, minimal assistance would probably keep them in their home safely but in our country makes this nigh impossible (all sorts of research showing people are better off and cheaper to have at home but insurance doesn't cover it. That is the only reason they are in house rather than at home.)
There are many, many people who are not DNR. They have all sorts of reasons- religion, still being fairly active and healthy, belief they will get better or will find a way to get assistance to go home. More than half my patients felt it was an affront to God and there were plenty more who didn't think it was time to decide that yet. I would say that less than 10% of the people in the nursing homes where I have been are in a state of waiting to die .
I am really confused with the last part- we need to look at societal costs of our preventative measures, the extent to which those preventative measures contribute to other risk factors like poverty and suicide, and balance it against the 25% of the people victimized by the disease who are not at the very end of their lives. If I'm 95 and have maybe months to live anyway, is it worth it to put millions on soup lines to make sure I get those last few months?
It looks like you are making the assumption that patients get the full court press to the detriment of others in society. This would be true if we had a system that was responsible for caring for all of us. We do not. Our system is profit/insurance based. There is plenty of money if we were not to rely on insurance companies who must turn a profit for their shareholders.
Spent a couple of decades discussing level of care with patients. Recommendation for screening and treatment is tailored to the patient and takes into consideration whether it is likely to be beneficial for that patient. Some insurances impede good medicine using age as a parameter rather than the state of the patient, require tests that might not be appropriate or decline to pay depending on plan.
If I am 95...is it worth it to be sure if I get those last few months? Sounds great. Who decides how long the person has- older people regularly defy logic for surviving and doing fairly OK. Dad les is 89 and has multiple co-morbidities. He can wear out my 24 yr old son who runs marathons. I am pretty sure he would be willing to whoop a55 if he saw that while telling you 'Semper Fi!'
Beyond all that I find it kind of disgusting how willing our culture is to dismiss the olds as a waste of resources. What we have was built by their efforts. Most of them have paid in for yrs. When they no longer have the ability to pay in we throw them away.