The difference is not one of formality. Rather, to eavesdrop is simply to overhear (intentionally, usually) a conversation in, say a restaurant or a hotel lobby. To spy is more physically active and involves following the person to places in order to determine activities.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.