Depends on how well written/what court decides to do.
I'm going to short circuit a lot of nuanced case law and differences between jurisdictions/courts here to give a clear answer:
Usually these things are written so the clauses are severable.
The court would then most of the time just remove the invalid pieces and leave the rest intact.
If it is not severable, the contract stands or falls as a whole.
If it falls, nobody is a valid user (though surely would be given time to stop or for mongo to fix it).
Why?
The default state of copyright is that only the owner has the rights.
If you invalidate the contract/license granting you non-exclusive permission to those rights, you no longer have that permission at all. So you have no right to be using it.
note: Any such court decision would only apply to the relevant court jurisdiction (IE if it was a district court decision, it would only apply to the parties)
It would just be persuasive evidence to other courts.