Lifetime is a delicate matter because we don`t understand the necessary factors involved.
According to my theory, the mechanics of a HDD is a sensitive issue because the quality-range of the production is much larger than that of a SSD. There are moving parts that have to work in a accuracy that is unchallenged in any other mechanics. The manufacturing is simply unable to hold up the required precision in order to have a low failure rate. In this case i think it can`t be truly expanded to a value lower than 5% failure. Failure simply means, the mechanics is lacking the required accuracy in order to maintain more than 1 year without failure. Unlike SSD, which comes down to a controller and NAND, defective mechanics is not able to be restored. Of course, if there are defective "sectors" they can be detected and then become wiped out of access. The HDD may detect it automatically by a algorithm, not much a user have to do (so the Bytes may vary dependable on sectors available). However... this will not affect the overall lifetime, unless the platter is generally of very bad quality. Sure, there are some processors on a HDD aswell (sometimes even NAND as a cache), but they got the usual failure rate of any well made chips nowadays.
In term the mechanics is well made, a HDD may have the same lifespan such as a SSD. In general, for an HDD surpassing 5 year of use they may have same failure rate and lifetime such as any SSD, but up to this point a HDD have to pass the test of time (and work)... A HDD nowadays is build more complex than a SSD. A SSD is simply a huge array of transistors and the cost including failure rate can be reduced a lot with new improvements in manufacturing. With HDD the matter is more difficult because there is simply some limiting laws of physics and with improved size and performance the challenge in manufacturing can be higher than that of the best SSD. In my mind, the HDDs nowadays are priced to low and i expect a price jump in the future. The only reason the price is still rather low is because usually they simply can`t charge more, else a SSD may just provide a better overall value. Another reason is because only the biggest drives are using the best technology, so the manufacturer can save up on cost for any HDD midrange or even lower than this. Of course, on a HDD with 16 TB and more size, the cost of using a expensive technology is lower compared to the total price of the drive.
Still, some of the new technology, especially Helium-Seal, is not as foolproof as we may assume. Sealing away Helium inside those drives is still a huge challenge because this gas is very volatile and it may even be able to penetrate something as dense as iron... sounds like a joke but this is science. Helium can even leave the earth atmosphere at a very slow pace. Yes, a rocket need a extremely fast speed in order to leave earth but this is not a absolute number, it depends on the material. So, over time, the drive may lose some of the Helium inside, which is just another issue out of many other issues a high performing HDD may experience.
Regarding SSD, as long as the controller is build well and not overheating, they can last almost forever. The NAND may have defective sectors but this is not a big issue because those "bad sectors" can be detected and then simply wiped out of access. The main issue, at least in the beginning of the SSD-era, was the controller. Nowadays the controller is developed so high, it is almost foolproof with just a few failures such as with any other processor.
As for the use: In general everything is common sense and both HDD and SSD got unique traits i do not want to miss. A HDD is great as a backup of any data, no matter the size, and in my mind for long term data storage it an be more safe than a SSD, because a SSD-NAND is to a certain extend more volatile than that of a platter. If the mechanics is bad, a platter can still be read by a data recovery lab (at a high cost), this procedure will not work with NAND. If NAND is defective, data is ultimately lost, because the charge is simply gone without any trace.
In general, the sequential read of a HDD is nowadays sufficient for any passive media streaming, so it`s great as a media-center and data-center for host and storage. As a worker-drive with active editing and of course boot- or gamerdrive a SSD is supreme, simply because of the performance and the high general reliability. However, if the data is huge (media-center and data-center, especially backup) a SSD with sufficient space is extremely expensive along with other disadvantages (data recovery of defective NAND is not possible).
Surely, HDDs even today are still relevant to us, but with increased capacity and lower SSD cost, a HDD may move to more specialized customers with special needs, especially the need of huge space. So, in 10 years or even sooner, there will only be few consumer-HDDs because SSD will replace almost any of the use previously done by a HDD, in as good as any consumer-device. We will only see HDDs as a cheap backup-storage in the consumer-market at a size lower than 10 TB (low to midrange).
More advanced backup-solutions including media and datacenter is more focused toward a minority as the space is so extremely big (above 10 TB as a single drive or even a NAS-array of 20 TB and more). So in general, HDDs will be for special needs and SSDs will soon be dominating almost any place... no matter consumer or industry.
This means, the previously highly developed "1.8 to 2.5 inch" HDDs are soon gone because there is simply no demand anymore, a SSD can take over this job; and the very huge enterprise HDDs (for media and storage) will be the new direction the development have to be focused on. So, we will see more of the heavy and huge 3.5 inch HDDs and the lower ones may slowly "fade away"...
Nowadays even consoles and almost any notebook is build using a SSD and this direction is only increasing. So, HDDs are slowly shifting toward special needs, especially industry.