There wouldn’t be an epidemic of pneumocystis pneumonia without an epidemic of immunodeficiency so I’m not sure that applies. But I see what you’re getting at. And, yes, e.g. if a COPD sufferer died of pneumonia of the pandemic strain I would call that a death attributable to the pandemic, noting that the COPD probably made them more susceptible.
When influenza deaths are estimated each year, the models assume that a lot of people will die due to the virus but the cause will be recorded as heart failure or pneumonia without etiology. From the perspective of the epidemiologist, they are influenza deaths, even if they were old and frail with bad hearts.