While it will never completely disappear, physical media is largely going to disappear for the masses. In reality, it already has. In the U.S., for the first six months of 2017 (RIAA hasn't released the full-year numbers yet), physical media was only 16.3% of the U.S. market (in dollars). Even downloads have become small - it was only 19.6%. Streaming takes 64.1% of industry dollars (and when the full year numbers are released, I suspect physical will be even lower and streaming higher).
There's plenty of hype around LP's, but only 17.2 million were sold in 2016 and only 7.2 million were sold in the first half of 2017 according to the RIAA and 14.32 million for the full year, according to Nielsen.
At its peak, 942.5 million CD's were sold in the U.S. In 2016, just 99.4 million were sold (RIAA). In the first half of 2017, just 35.2 million were sold according to the RIAA and 87.97 for the full year according to Nielsen.
So you take those numbers and throw in a percentage of consumers who buy online instead of physical retail and there's not much left for physical retailers. In retail, success is judged by annual sales per square foot and if something else can generate more revenue in the same space, that's what physical retail will do. In addition, music used to be a way to increase what retailers call "dwell time" - the amount of time someone spends in a store. The more time one spends, the more money they're likely to spend. Families would go shopping and the kids would go browse the records and it would increase overall sales. That doesn't happen anymore because the kids are streaming everything.
Target has announced that they might stop selling CDs as well unless the record companies will let them pay for the merchandise only after a sale is made, essentially buying product on consignment. The labels are unlikely to go for that.
The other thing that's happening is that these big box stores are reconfiguring and newer stores are much smaller. A "mini-Target" opened near me (replacing a Barnes & Noble) and they don't sell media at all.
And yes, physical is in major decline for home video as well. In 2009, DVD + Blu was an almost $11 billion business in the U.S. In 2017, it was $4.7 billion (including UHD). They'll be fewer releases, fewer restorations, fewer deluxe packages, etc., as time goes on. It's becoming a niche hobbyist market. It doesn't mean it disappears completely. It means primarily only the biggest, newest hits will be released, because it's a hit driven market anyway, especially Blu. In 2016, the top 100 titles took 70% of industry dollars and 57% of industry units. It means a retailer need stock only 200 titles to fulfill the needs of the vast majority of consumers.
If you're a physical media collector, my advice is that if there's that LP, CD or Blu you always wanted (especially boxed sets and special editions) but never bothered to buy, buy it now. Very few titles are going to get re-pressed. Of course the used market will be around forever, but the good stuff is always very expensive.