My theory is that the original invite is a form letter and was in a stack of papers to be signed as soon as the new speaker was determined. Maybe it was auto-signed.
Basing this on the fact that it was signed & delivered during the shutdown without the qualifier that the invite is only valid if the shutdown has ended.
The other mistake Pelosi made was trying to bullshit her way through the reasons for the dis-invite, without considering that she had to trash the SS and security units to do it. If she had just said, "I'm dis-inviting you because I can. BTW, fuck you" it would have been at least believable.