Soaking an egg in vinegar causes pickling to occur. The acidity in the vinegar slowly breaks apart some of the molecular bonds of the egg's cells, with or without shell, and causes it to ferment.
If the egg is boiled and the shell removed, the end result is a pickled egg, commonly found as a pub snack. Producing pickled eggs can take a few weeks. They are traditionally seasoned with a variety of spices along with the vinegar. If the egg is raw and the shell still in place, the vinegar solution slowly starts to eat away at the shell, dissolving it and leaving the egg intact in the underlying membrane. The vinegar causes this material to become rubbery, and the egg can be bounced somewhat due to the membrane's curing.