It would be effective, but maybe not have the effect you are hoping for.
People investing in rental homes would invest more into homes targeted at higher incomes, and the quantity of homes available to lower income people would decrease, driving up rentals on them.