I am actually facing that dilemma, as Mojave will be the last Mac OS I will be able to use on my late 2012 Mac Mini (the Mac Minis that came out in 2014 should support at least 2 more of the versions of the Mac OS after Mojave).
The issue with using older software is that there comes a time where it is no longer updated (especially for Security reasons) nor supported. That of course varies from product to product. Apple has actually been providing Security Updates for El Capitan and Sierra. Office 2011 is no longer supported by Microsoft, but it can run on Macs with the OS all the way up to the current one, High Sierra. Some companies, like Titanium Software, make versions of a product for each Mac OS (Onyx is the product).
What it mostly comes down to is how you plan on using your Mac, and thus what software will you be running. If you purchase a Mac model that is within 2 years (or so) of the most current one, it should be useful for at least 5 more years (maybe longer) in terms of software.