20 years worth of baptisms invalidated

It depends on what they believe

Is the baptism a symbolic ceremony or absolutely necessary for their immortal soul?

And if it's the latter and the church says it's the latter is there any legal recourse for the families of those who had an invalid baptism but passed away before it was discovered?

Sacraments are efficacious symbols, meaning that they actually convey what they outwardly represent. So baptism, while giving the imagery of washing one clean, actually conveys sanctifying grace and is necessary for salvation.