Well with the edited content of the question I'm still a bit confused what you're hoping to get out of an answer. The short and simple answer to your question is "it depends." There is no such thing as "the ideal archival medium."
The fact that you say that "refreshing a flash drive" is a good idea confuses the issue even more. You're asking us to say only based purely on the physics of floating-gate flash technology and GMR storage technology "which is superior." Well, refreshing a flash drive every time that it gets close to it's retention limit doesn't discuss either of those topics and yet it still sounded like what you wanted to hear.
Flash can hold data for a long time in certain conditions and with certain considerations taken into the manufacturing process which sets parameters in how effectively the floating gate retains the charge it is given. To be honest, I'm not in the semiconductor manufacturing field so I can't describe to you what these parameters are. But the problem is that even if I could tell you "flash has a longer retention period if you doped region X with material Y and made this part of the gate larger," that doesn't seem to help anyone produce a system which retains information for longer.
One of the major points of my answer was to show you that the flash technology used in PIC EEPROM and the flash used in a standard SSD and the flash used in a compact flash all have wildly different characteristics. Despite the fact that the intel 520 SSD is a much more modern piece of technology than a PIC, it only guarantees retention for 1 year. It depends on the manufacturing process and without a lot of information about what is even possible within the manufacturing world I can't begin to do math and numbers to try and show you that it's possible to produce an inherently "better" archival medium than a standard HDD.
GMR may or may not be the best way to store magnetic information on a drive when you're optimizing for data retention. The first commercial drive using the technology was only released in 1997, who knows what the real world retention time on these drives is? The ideas behind modern storage are generally aimed at optimizing density which frequently negatively affects retention time. The whole comment about me being unable to find WD specs on data retention periods was also another point: it's not a current concern in the data world how long data can be safely stored.
When it comes right down to it, when you look at the fact that you're looking at timelines in excess of about 10 years, it becomes a bit odd to bother trying to figure out a clever method to do it. Today, you can relatively cheaply hold 3TB of data on a single 3½ inch drive. In 2002 the first harddrive was produced which could hold 137GB. In 1983 the first 3½ inch drive was released with a capacity of 10MB. In 1956, the first drive capable of holding 5MB of data was the size of two refrigerators.
What I'm getting at here is that every problem can be optimized. Why you are optimizing it, what you are willing to do to reach that goal, and what you're trying to accomplish set the parameters for that optimization. I cannot produce different floating gates than what is commercially available now so I did my best to provide some different answers based on what is commercially available now. I cannot make my own harddrives so I did my best to answer with some searching on what's available now. Both of those things are at the mercy of what other people did to optimize, which as previously mentioned was not data retention time, but data density.
Sorry for how long winded that was, but I hope you get what I need to answer the question?
Oh man, this is a question I think about ALL THE TIME. Something I obsess over is duration of media. For some bizarre reason when I was younger I was frustrated by the non-permanence of things, and I sought to find something in which my collection of dumb crap from the internet could last forever. How long are you hoping to archive for? That changes the ballgame completely, but I'll assume the question is for "as long as you can friggin' get it to last."
Note that I also have to ignore the premise of the question because you start getting into extremely dumb scenarios: if you have a set of Samarium-cobalt magnets each the size of a tube of lipstick storing exactly 1 bit (zero is polarized so that north faces one direction through the coil surrounding it and one is polarized the opposite direction), then it will be AWESOME at storing data for an eternity, and I think more effectively than anything you could do with flash, but not very densely packed and extremely expensive.
So to totally sidestep your actual direct question, the best storage medium is probably ink on paper. Not terribly dense, but there are a number of solutions where, if you get a reasonable printer (around 600 dots per inch), and some nice paper, you can fit ~500KB uncompressed on a single 8.5"x11" sheet. Check out this site for an open source implementation. Note that you'll need a scanner which is pretty capable (around 1000dpi non-interlaced) in order to get the data back. I would assume you would want to make it even less dense to get the information to still be readable decades from now.
Back to what exactly you were asking:
Magnetic media has a shelf life of ~10 years before the encoded information is lost because of the continual pull of the Earth's magnetic field. This may be shorter or longer depending on how densely packed the information is, but the rule of thumb 10 years for magnetic data generally holds up well, but I haven't really tried to check it against anything too modern... really, anything within the past 15 years may be worse than this for retention. I know it definitely applies to 5.25" and 3.5" floppy-disks, but modern HDDs are probably much worse. It used to be that the information was encoded as one-bit per magnetically active grain on the surface of the platter in the harddrive. These days, in addition to the grains on the drive being much more fine (and thus more susceptible to external magnetic influence), they also store multiple bits per grain (so north facing up is 00, and north facing down is 11, north to the left is 01 and north to the right is 10, etc). This means that even if they were as resilient as larger grains to the pull of the earth's field, there is a finer line between the states defining the information. That being said, I was unable to find anything from Western Digital which gave a direct shelf-life to the data on it's commercial products.
Flash storage retention gets worse the smaller the flash cell. Currently, the Intel 520 series (the SSD which I own) says that it "meets or exceeds SSD endurance and data retention requirements as specified in the JESD218 specification". Looking up that standard is a pain, so I'll give you the short version: minimum 1 year at 30°C.
So long story short: HDD wins in the density vs time equation. Hands down. The downside is that if you're going for extremely long shelf-life, you'll have to refresh the data periodically (I probably would try and do it once a year), and after a decade or so you'll have to worry about the integrity of the mechanisms inside of a standard hard drive. There are definitely different flash storage technologies, and essentially, the less-dense you're willing to be the longer-lived your data can been retained without migrating. The ultimate (while still being reasonable) archival medium is probably industrial flash technology, but it won't be very dense. See the block below for some more examples of what I'm talking about!
Some other random thoughts:
- If you ever hear about how CDs have a 70 year shelf-life, this is based on the idea that you have an archival-quality CD and you're VERY gentle with it. CDs have a metallic layer which will oxidize if there is even the tiniest breach in the metallic layer bonded to the plastic, which is why most CDs have a shelf-life closer to about 10 years. Even commercially produced CDs suffer from many different issues. Burnable media, as opposed to media created at a factory which presses specific CDs, also uses an organic dye layer which can fade even more quickly (especially under UV, like direct sunlight). I wouldn't trust most burnable CDs to be free of errors past about 2 years if it hasn't been kept in extremely favorable conditions
- If you really, REALLY need to store that information forever though, check out the mid-range and low-end PICs. They have on-board EEPROM which has a listed retention of more than 40 years! This is what makes me assume that there must be some pretty intense flash storage media out there in the wild
- While looking around for some links about drives, I found this interesting one from Western Digital. Their 8GB compact flash drive has an expected functioning life of 324.3 years if you write 135.2GB per day. This seems like it may be the ideal solution in combination with some sort of industrial microcontroller which refreshes the information on a daily basis or something. You'll probably be more hard pressed to figure out how to keep it powered for the next 324 years though (nuclear power cell/beta voltaic?)... I didn't poke around too much for the expected data retention when not in use, it may not be very good.
- Everything fades eventually! If you're going for extremely long shelf life (i.e. your great-great-great-grandchildren on the Mars colony), there is essentially no mechanism for conveying data which will not eventually fade. As an example: do you even have a 5.25" floppy drive any more? If you had a crazy setup to keep your floppies refreshed from 25 years ago, it probably feels quite silly now! Anything really absurd you work to set up now will likely feel just as silly. USB will eventually disappear, SATA, FireWire, eSata, PCI, all of it. The best way to ensure that your information survives is to put it into some format which can be understood without any assistance by a machine. Everyone who sees a photo album will understand it if they can hold it and see the annotations you wrote in pen. Not everyone will get that the CD with your pictures on it is a bunch of personally curated photos when no one has a CD drive.
- If you want to see some crazy engineering to have a clock which lasts forever, check out the 10,000 year clock