Diffusion is the spontaneous movement of any substance spreading from a higher concentration to a lower concentration, attempting to reach equilibrium.
Osmosis is similar, but is particular to solutions (dissolved mixtures) separated by a membrane. Osmosis is the process in which water moves through a membrane. The natural movement of water is from the side of the membrane with a high concentration of water to the side with a low concentration of water.
After dissolving the eggshell, we are left with a membrane that holds the insides of the egg. This membrane is selectively permeable. This means that it lets some molecules move through it and blocks out other molecules. Water moves through the membrane easily. Bigger molecules, like the sugar molecules in the corn syrup, do not pass through the membrane.
You may have noticed that the egg expanded in the initial vinegar solution when you dissolved the shell. This is because the vinegar has a higher concentration of water than the inside of the egg.
To reach equilibrium, water molecules move from the vinegar into the egg through the semi-permeable membrane. If the membrane were completely permeable, water molecules would move in and protein would move out until both solutions were the same concentration. Since the egg membrane is semi-permeable, water can move in but proteins cannot move out.
If a naked egg is placed in the corn syrup the egg will shrink. This is also due to osmosis, but in the opposite direction. The corn syrup is mostly sugar. It has a lower concentration of water (25% water) than the egg (90% water). To reach equilibrium, osmosis causes the water molecules to move out of the egg and into the corn syrup until both solutions have the same concentration of water. The outward movement of water causes the egg to shrivel.