Is there a scientific term for this?

Is there a medical or scientific term for the micro-second of confusion caused when your brain receives a given stimuli and expects something different than it actually receives and it has to recalibrate itself to the stimuli actually received as to opposed to what was expected. (whew!)

Example #1: You’re at a party drinking Diet Pepsi. You go to take a swig of your soda unaware that while you were talking to another guest somebody moved your soda can and placed an open can of Sprite on the table. You expect to taste Diet Pepsi but instead your taste-buds and brain get Sprite.

Example #2: After a long vacation you drag a very heavy suitcase into the house. Later you go to move it, unaware your significant other already unpacked it. Your brain "knows’ the case is very heavy as you’ve already lifted it before. But it’s now much lighter. For a brief moment you feel like you have superhuman strength.

Example #3: The rear-view mirror in your car fell off and you haven’t had time to fix it. While driving, out of habit, you occasionally glance towards your rear-view mirror. Your brain, out of habit, expects to see what’s behind you but continues to see what’s ahead. For a millisecond your brain has to adjust to reality as opposed to what was expected.
Is there a name for this?

They’re all basic examples of cognitive dissonance: you have two simultaneous ideas (Coke/Sprite, Light/Heavy, Mirror/No Mirror). One from your memory which conflicts with one from your perception. It takes your brain a moment to decide that your perception should take precedence.

My medical studies were some time ago now but you are referring to a phenomena first defined and explored by a trio of neurological anthropology students at St. Andrews University, Scotland.
The three were David Watts, Adrian Thomas and Douglas Finlay. They were very interested in finding out what caused this period of confusion and their joint paper was widely read and very well received to the extent that they lent their names to it. Hence in medical circles they speak of the "Watts, Thomas, Finlay " moment (Or WTF for short)