Piglet john, according to below site, no tax is payable at all on dividends from shares unless you are a higher tax rate payer ie 40%, even then the rate you pay is lower at 25%. Landlords are not given such a great deal, rental income apart from expense deductions are taxed at normal income tax bands.
Also I don't believe your statement is correct that people who buy shares cannot offset their interest expense against their dividend income. They can, it is called buying on margin. The difference is that people don't tend to buy hundreds of thousands worth of shares at once like in property so they don't tend to borrow money to do this. In addition, financing against share purchase is a much riskier and expensive business since the lender's money is not secured against a stable asset like property, and buying shares on margin amplifies your returns or losses massively so it is much riskier for the investor also. All in all, it is only the most sophisticated of investors that buy shares on margin, and they can offset financing cost against income, often through a company also.
I wish people would judge after they got the facts right. If small scale landlords all sold, it is NOT good for the market, remember when prices tumbled in 2008, and all the first time buyers kept on renting rather than buying (pushing up rents at unprecedented rates) because they were too scared to buy for fear of buying into a falling market. Guess who benefits from such a market? Fat cats with millions of cash waiting to pounce, they won't care about tenants, or condition of properties, they just want to meet their return and yield targets.