You can't replace Android because those devices are locked down and have no open source driver available, but you can install various Linux distribution on top of Android. Check out UserLAnd or Termux.
Those are very old models, btw. For the better or worse... At least they should be cheap and practically everything will do for a PDF reader. I'd just check if the display is still acceptable by today's standards before buying something. I know some of the low-end tablets come with sub-par displays to cut down on costs.