Up to 7 years before "vintaging" + approx. 2 more for security updates. Beyond that- even if it is still fully functional hardware- assume you have to buy a replacement. There are hacks to squeeze more upgrade life out of them but then you are trusting third parties at the OS level.
Base Mini with only 8GB of RAM will likely use a lot of SWAP (using SSD like it is spare RAM) and none of us can absolutely know if SWAP will eventually wear out that SSD sooner than 7 years. 10 or 20 fans will chime in on this assuring everyone else that there is nothing to worry about in SWAP but everything objectively written about SSDs talks about "limiting number of writes" to preserve SSD life, so process fan assurances accordingly.
Those who will make such assurances won't be there in- say- 5 years if the SWAP issue actually starts panning out like the Apple Fusion drives... where the SSD portion wears out from- you guessed it-
too many writes and thus demands that the drive is replaced or retired. A positive about Fusion is that you could replace only the drive and then carry on with those Macs. Silicon has no such option: when
any part conks, you buy a new computer.
The point: since
NONE of us can actually know for at least a few more years with any real confidence about Silicon SWAP, the safe play is NOT buying base specs but at least paying the (relative) ripoff price for additional Apple RAM. If this option, you mostly take "too frequent SWAP" risk off the table.
Else, you can gamble and hope for the best. There will certainly be many who argue it's no gamble at all... but they don't know and are not extending any warranty against SSD drive failure years from now. I bet if we did a bunch of research, former Mac buyers worried about too many writes to the SSD portion of Fusion who posted their concern were likely similarly reassured by fans that there was nothing to worry about there too... that the genius of how the OS would manage the SSD portion would focus it mostly on READS so it can last for life of that Mac. See "my fusion drive is dead/dying" threads galore all over the web and think carefully about your new Mac purchase.
If me, I find the cash to buy the extra RAM and reduce that risk (and grumble to myself about the price of Apple RAM vs. PC RAM). If it ends up that SWAP worry is misplaced, more RAM will simply mean a faster Mac than leaning on SWAP to accomplish the same computing.