"Optical Illusions" or sometimes referred to as "Geometrical Illusions" aren't illusions in the sense that we are seeing something that isn't there. It's an illusion in the sense that the interpretation of what is there is wrong.
Typically this involves seeing movement where there is none as in the picture you provided. A scientific way of describing them could be:
When subjects are instructed to carry out a task to which the visual system is not adapted.
Which in layman's terms means our brains cannot handle the way the information is being presented to us. It is presented in such a way that our brains force us to interpret something that is not happening physically, even though what we see is actually present.
Interestingly this doesn't just happen with optics but audio as well.  This gives credence to us being able to detect what is actually going on versus what is being interpreted as going on by our brains. As noted in the study:
Listeners were presented with a sequence of sinusoidal tones, each tone 250 msec in duration and with no gap between adjacent tones. All tones were either 400 or 800 Hz, and these frequencies were presented in strict alternation. This sequence of alternating tones presented at equal amplitude to both ears simultaneously for 20 sec. However, when one ear received 800 Hz, the other received 400 Hz and vice versa.
It's important to note that this study found that no listeners interpreted the stimulus properly. We know this because the researchers only used 400Hz & 800Hz frequencies and controlled exactly which ear was receiving it. People either heard something that was not there or something contradictory to what was being played. This shows we can measure what actually happened in the illusions since we created it and are able to quantify it.
This can similarly be done with your image.
1) A human created that image thus we can create a similar image and know exactly if we created a moving image or not, then compare to what people interpret to see if illusions occur.
2) You can track any pixel on that image using software to see if it moves and compare to what subjects interpret.
There are also other interesting studies such as the optical illusion of a baseball being in motion.  This is particularly useful as this can be described with physics which can tell us what is actually going on versus what we are thinking is going on.
Another interesting study is that autism may change the way the brain interprets optical illusions.  Leading more to the idea that our brains are flat out wrong about what is happening because even though the information has not changed it has been interpreted differently. Sometimes resulting it people being less susceptible to an illusion.
The answer to "How does everyone know?" is that people can know because we can use tested methods of interpreting data correctly and observe the difference between that and what our brains alone interpret. Our brains are evolved for specific types of environments and sensory illusions are things that are often too unfamiliar to our brains to deal with properly.