As I understand it, JPII added P.P. to his papal signature without telling anyone what it stood for. Most folks guess that it stands for “papa”.
Though I could certainly be wrong, I don’t think that it stands for “pontifex”, as that word appears in the more standard abbreviation “PM”, for “Pontifex Maximus”.
The PP was definitely part of the papal signature before Wojtyla (Cite: This picture of a document signed by Pius IX., 1846-1878, where the abbreviation appears).
I assume it simply stands for “papa,” the vowels having been omitted.
Notice also that in the Pio Nono document, it reads:
“Pius PP. IX.”
and not
“Pius P.P. IX.”
strongly suggesting it’s not an abbreviation of two separate words.
I’m not sure if this is the source of the PP. abbreviation, but the pope is sometimes called “Pastor Pastorum” (Latin for “shepherd of shepherds”). I believe this phrase derives from the writings of Augustine, but I haven’t been able to find a citation.
A somewhat related thread from a year ago: “The Tudors” and signatures of historical personages, where it turned out “The Tudors” miniseries incorrectly showed Pope Paul III signing a document as “Paul III” (as I pointed out, he really would have signed his name as “Paulus PP III”).
What is apparently the earliest use of ‘PP’ to refer to the pope seems to simply be an abbreviation of ‘papa’, though it could have meant something else. Likely not a Roman-derived title, though, since this is from the Third Century. That doesn’t mean that’s the undisputed origin of its modern usage. Possibly it got re-used and different meanings have been attached over the years.