The reason that making mortage interest and taxes deductible is constitutional is that it is 100% non discriminatory--ANYBODY who takes out a mortgage on their dwelling--is eligible for the deduction, and it is uniformly applied across all 50 states. The fact that some cannot or choose not to benefit from the deduction does not make it unconstitutional any more than does the fact that all won't need or use certain postal services or interstate highways or a passport.
You say it's non discriminatory and then proceed to specify that it's only available to people who take out a mortgage. That's the very definition of discriminatory.
According to this line of reasoning, food stamps are also non discriminatory since ANYBODY who makes below a certain threshold is eligible.
If every legal government function had to benefit every citizen uniformly we would have no government functions. If I choose to have a septic system even while paying taxes to support th city sewer system, that does not change the fact that I am eligible to hook onto the city sewer system if I want to. If I pay school taxes even though I have no children in school at this time, that does not change the fact that my kids, if I had any at home, would not be eligible to attend school. If some of my taxes go to pay for the federal and state highway system despite the fact that somebody doesn't own a car and never leaves his/her neighborhood, that does not change the fact that those highways are as available to him/her as to anybody else.
The whole idea of the 'general welfare' is that it has demonstrated positive benefit to the community and is available to all citizens irrespective of race, gender, ethnicity, sexual orientation, age, socioeconomic or political status, or any other criteria used.