If you were not in a first position you might have lost your investment.
You ned a real estate attorney to ask your question to.
However I am not an attorney.
Here are some things to research and ask an attorney:
1) what position in the line of debts was/is your loan.
2) do your loan docs say anywhere in any paragraph that you request to be notified in the even of a foreclosure by a loan in a position in front of you.
3) if you weren't notified by the foreclosing entity, why not, and do you have any legal remedies .
(Please note: when you choose an answer as a Best Answer, or at least give a thumbs up, it helps those who answer questions here.)