He spent all that money to buy a house.
Although most listeners would guess what you mean, this phrasing could possibly mean that the money was spent to enable buying a house, not on the house itself. (Perhaps on realtors' fees?)
He spent all that money buying a house.
The above is probably best of your listed options...
He spent all that money on buying a house
... and that one seems a bit awkward.
"Spent" and "buying" do seem a bit redundant, but unless the context makes it clear, it's not quite so — you could spend all your money renting a house or repairing one. If you want to rephrase to eliminate one of the words, you could say "He bought a house with all that money."