Was the claim made against the developer made by the community for defects or problems with common property or was the claim made by individual owners for defect or problems in the individual units?
This is important to answer your question.
If the claim is by the community for problems with common property, then the funds are paid to the community. If the community then choses to return it to the individual owners, the funds go to the owners at the time of such pay out.
If the claim was done by individual owners for problems with their respective units, then the funds should be paid out to the owners that made such a claim and not to any new owners.
If you are unsure of the facts, it is probably because the community was the one that made the claim as otherwise you would have had to appoint lawyers and procurators, pay court fees, etc. in your own name, and for sure you would remember this.
In the likely scenario that the claim was made by the community, in the selling documents, you could have stated that any payback would come to you but if you did not state this in the Escritura of Sale, then the moneys rightfully go the current owners, it being presumed that the sellers got their investment back through the sale price even if technically this is not correct.