Why would a 98 Ford Escort ZX2 make a high pitched whining noise while driving and immediately after engine is turned off?

for me it was a bearing that was going. unfortunately i did not find this out until it broke and took my engine with it. So i would have someone listen when you shut off the engine to see if you can pin point where it is coming from. Mine was the tensioner pully of the timing system. ANSWER for lindseycm:

my car does the same thing. ford dealership said it was a loose drive shaft and not worth fixing. I have a 99 zx2 that was doing the same thing. It drove me nuts. Turned out to be the crankcase breather filter, dealer only part, about 15 bucks. It is located on drivers side on top, near valve cover and air breather tube. Has two vaccuum lines hooked to it. Try disconnecting to see if noise stops. If the noise stops, replace it. Dealers don't normally stock this, so you may have to wait a day. Good luck.