Welcome to the forum
I'd recommend a Pentium. Will run MS DOS just fine, Linux distros with window managers from the late 90s fine. CDROMs wont be an issue, and you'll be able to use larger hard drives with less hassle.
I have a 486DX40 with an early version of NetBSD and I'll say that XWindows didn't perform very well, but I have a Pentium 200 running RedHat 6 just fine with a GUI.
I have found Pentium machines in dumpsters before, so if you find one, I wouldn't spend much more than $50 unless it comes with dual VooDoo 2's or throws flames out the back.
Just my two cents.