So, I take it that there are two questions there and that the first question is, if one marriage is declared null for this (or some other) reason, are all marriages that labor under the same difficulty null in the eyes of God?
While I don't grant your premise that this intention renders a marriage null, that would in fact be the case, as the Church does not actually anull marriages, i.e. render them null, but merely declares they they were null, never marriages in the first place. There are probably couples who are not married and don't know it, probably not due to a defect of intention but for some other legitimate reason (didn't know one was baptized Catholic for instance). Objectively speaking, in the eyes of God, those marriages are null, but of course God would not hold them accountable for adultery or fornication if in fact they were in invincible ignorance of the situation.
I always use this example. If I see a $100 bill on a table and I pick it up and leave, and I THOUGHT it was mine but actually turned out to belong to someone else, objectively speaking this was a grave injustice and a theft. But subjectively there's no sin because I was ignorant. On the other hand, if I see $100 on the table and THINK it belongs to someone else (but it was actually mine), if I make off with it under those circuмstances, then I am subjectively guilty of grave sin despite the fact that there was no objetive injustice or theft.
As with the other Sacraments, this "intention" stuff is nonsense, especially for those married in front of a Catholic priest. They go to the church intending to do what the Church does, and so intending to get married.
But, to answer what I believe to be a second question, if they later formed the intent to properly marry, what matters is the intention at the time of the marriage itself, so the marriage would have to be sanated by repeating the vows before the priest ... which the Church will automatically accept, especially for a couple who have been living together as if married.