Sadly, "Pope Joan" is a 13th century "urban legend", that might have been intended as papal satire, which was spreading in the period. So, like many other things in M2TW, it is quite ahistorical.

Quote Originally Posted by Vlad Tzepes
The legend of a female Pope, event that supposedly happened around AD 800 according to some or AD 1000 to others, is one of the juiciest surrounding the Vatican. There's another legend linked to the first one, stating that after they learned, horrified, they have elected a female pope, cardinals learned their lesson and started checking if the new pontiff was indeed a man by using chairs with holes in them .

I think it's a nice bit of history controversy in MTW2 that you could have a "secretly female" cardinal elected as Pope.