Is it safe to put an external drive on top of my desktop case near the hard drive?
Solution 1:
Shouldn't cause problems. Most computers are designed with slots for several hard disks right next to each other.
Solution 2:
I'd say the only danger was from the external drive falling off the desktop case when (note not if) you knock the desktop by accident.
As sgmoore points out the slots for the internal drivers are quite close together - they just leave an inch or so gap for airflow.
Solution 3:
Magnets are not dangerous. Hard disk magnets are not so strong that their magnetic field is contained mostly inside their body. Practicly this is a common usage to have several hard drives on top of each other - you can see it in every PC case in the placement of hard drive bays.
However heat may be a problem. I've read stories about overheating hard drive (never experienced such a thing myself) and you may wish to place a cooling fan and keep a gap between drives to maintain air flow.
And use your screws to hold the drives at bay. Otherwise they can fall out if you move your case and hard drives doesn't like falling shock.
Solution 4:
Just a minor addition:
While hard disk magnets are strong enough to make me salvage them from broken hard disks, they're also mounted so as to "counteract" each other. If you take one of those magnet pairs as it is mounted, and try its effect on items outside the enclosure, you shouldn't see much effect. Only when you tear them apart from each other and use the single twins of the pair will they show their true strength. The magnetic field generated by the motor would seem more troublesome to me, but that applies to CD Drives and the like as well. Normally, shielding and the, albeit little, distance between the drives is enough to keep them from irritating each other. As already mentioned, heat or the risk of falling is much more of an issue, as is dust when it clogs up the vents of the enclosure.