Hard drives are based on magnetic media, and can be altered by a really strong magnet. Flash memory is not really affected by magnetic fields. A uniform electric field outside is also not a problem; breakdown of the oxide is the main failure mechanism. Flash memory is pretty tough!