Let me try to understand your question. You know that you have squatting. You know that your lease is invalid, and you know that the person(s) to whom you have been paying rent is someone who has no possessory interest in the real property. On these facts, I am not sure how you think you that you have any right to stay. Your real dispute is with the person(s) to whom you have been paying rent. They have defrauded you. File a complaint with the District Attorney's Office. Also, sue them in small claims court to try to recover your money. I wish you well with your matter.
Mr. Lowry is correct. You do not have any legal recourse from the current or prior owners of the house. Your legal action will be to recoup your losses from the person with whom you made the lease agreement. If you lost money, you are entitled to that, but you are entitled to recover through the person you made the deal with. The actual owners of the house were not at fault and are not liable.