All of my experience, the last 10-15 years has been on the road. And your story is the exact same as mine. I wanted to go cheap because I didn't expect to hit a trail all that often. That said, I have recently ordered my first ever mountain bike. I ended up with a Trek Roscoe 7 ($1300). Way more than my original $750 budget. However, I did have requirements that pushed the price. Hydraulic brakes and a lockout fork were a must. And the Roscoe comes with a dropper post already installed. If you can do without those things, Trek and Giant both have great entry level bikes for $500-$700.
Since you already have a lot of biking experience, you know the risk of buying used. Depending on the seller, something like a mountain bike could have a lot of hidden defects waiting for the first time you bounce over that tree root.
Good luck