I grew up Catholic, but am not an active participant now.
My priors are that the conception of the clergy and the Pope in particular as being wise, holy men who care for and shepherd their flock is very modern and would not be the perspective of many religious people in Medieval Europe. In particular, I assume that the Pope would see himself as a monarch of a government and the clergy as his bureaucracy across the kingdom. (Side note, I would assume that monks in monasteries would be seen as more faithful, but maybe they would be thought of as more like professors, who we often joke about today as being disconnected from reality and not concerned with what is really going on.) These leaders could also have faith or they could sinisterly feel that they were committing a great heist. Essentially, I have a very cynical perspective on the old church.
Now, my main question is whether there is any evidence that the leaders thought of themselves as rulers, not as being icons of morality? A follow-up, is there any evidence (diaries, letters, etc) of leaders who explicitly said they felt they were tricking the world for gain with the cover of faith?
I'm primarily thinking of Popes like John XII, Benedict IX, Sixtus IV, Julius II, etc. My assumption is that the answer to the first question is, "Obviously, yes, because they competed like any count" and my assumption is that the answer to the second question is, "There are many accusations of ill will, but no direct evidence, because the only writing that has survived is political writing from when they played the game."
[I]s any evidence that the leaders thought of themselves as rulers, not as being icons of morality?
Why not both?
Because, on the whole - and certainly in the central Middle Ages, which is the period I'm most familiar with - this was the case. In the minds of the popes themselves, they were first and foremost a spiritual leader, the successor of St Peter and the pastor to Western Christendom. The papal government which evolved, primarily in the twelfth and thirteenth centuries, was seen by them as the tools through which they could achieve this end. Unlike the modern papacy, medieval popes weren't simply theologians and kindly priests, who tried to teach and to provide an example for their flock; they were active disciplinarians, who sought, like a good father (so they claimed), to steer their flock onto the straight and narrow for their own good and for the salvation of their immortal souls. The crusades, the inquisitions, the papal chancery and all of the associated institutions were, ultimately, wielded in the hopes of getting as many Christian souls to heaven as possible. There's no doubt in my mind that the majority of medieval popes, particularly after the internationalization of the office after 1046, had a very sincere and deeply-held faith.
That's not to say that there weren't scandalous popes, and you've name-checked a few in your OP. It's important to remember though, that these popes were scandalous in their own times as well, and there were frequent and regular attempts to 'clean up' the Roman curia. The one I'm most familiar with, and the most dramatic of the medieval period, was the synod of Sutri in 1046, where Emperor Henry III swept into Italy and deposed three popes, all of whom were mired in some scandal or another. Henry drew on the influential reformists of his court to supply the papacy for the next few decades, and this set a trend in the highest office. For the next two centuries, the papacy spent enormous political and real capital on projects such as the ending of simony and clerical marriage, expensive and almost never profitable crusades, encouraging the growth of theological schools and the expansion of papal bureaucracy to answer the increasing needs of those who corresponded with the curia seeking advice. Perhaps the culmination of this is the Fourth Lateran Council, in 1215, where it was agreed to set uniform standards for parishes across Latin Europe, with an emphasis on the education of every lay person in the basics of the faith and their regular participation in the mass.
In short, it simply doesn't make sense to assume that medieval Popes (or religious figures in general) were just gaming the system for personal gain, as their actions don't make sense if they were. There were exceptions, as there always are, but these were condemned even by contemporaries.