Could I have gotten a prostate infection when my partner spat on my penis during a hand job?

Unlikely. Prostate infections occur when bacteria or other pathogens enter the prostate. Although a hand job with saliva may cause an infection, it is unlikely since the saliva and bacteria present much travel through the urethra to the bladder and prostate area, which is unlikely.