Back in the film days, an aspiring young photographer was told to get a simple manual camera, like a Pentax K1000. The advantage was that there was no automation to distract you from learning the basics. Back when I was young(er?) I had a Canon TX, which was basically the same thing.
Now with digital, we have new whiz-bang models every few months, but we still don’t have a simple manual option. But lets step back and see what we need for a learning camera.
Of course we want manual exposure, and preferably an easy to set manual exposure. I had a digicam that advertised manual control, but it was so convoluted to use it was useless. Same goes for manual focus.
We also want a camera capable of RAW file capture. In a nutshell, RAW is to digital files what manual is to exposure. It shows us the basic capture and allows us the maximum data for post processing. Like manual vs. automatic exposure, we do not want the camera to be making decisions for us yet. We want to learn how things work before we learn how to use automation to take short cuts.
So, with these criteria, I would recommend getting an older used DSLR, especially since these can be picked up quite cheaply. An old Nikon d100 or d200, or my trusty Fuji S2 Pro. I do not know the equivalent Canon, or Pentax bodies, but any from around this era should be fine. (One consideration though is to look at the system you are going to be buying into. You are going to be buying a few lenses, and these can be a significant investment. Changing brands can be costly.)
One disadvantage with this option is that some modern RAW converters may not recognize these older cameras. Another reason for using open source software.