I joined the Air Force through the Financial Assistance Program (FAP) - I was already a med school graduate and joined during my residency. The AF supported me financially through two years of residency, and then I was on active duty. The payback was 1-for-1, plus 1, so my initial commitment was 3 years. That's shorter than the HPSP payback and also gave me the freedom to train in whatever residency/field I wanted.
I also met some older physicians at officer training who joined up after several years in civilian practice. I don't know the terms of their commitment. Presumably it involved some kind of sign-on bonus but I don't know how much nor the length of their initial commitment.
I also don't know if you can join "while going to school" if you're not HPSP, but I don't know how important that aspect is (vs just waiting until after medical school) if your goal is to be a military physician.
So, no, HPSP or USUHS are not the only ways to become a military physician. Good luck!