Without knowing all the facts of this case, but making the assumption that he simply sold his home to a buyer, then what case does he have to answer??
He was free to sell his home to anyone he wished to for any price that they were willing to pay. Even if the buyer told him he would build illegal flats, thats the buyers concern.
Unless he had a commecial connection to the build of the illegal flats then I don’t see what the Spanish authorities can do.