I know they had lots of powerful factions and families, but Venice, for instance, was a republic, no? And Rome was a theocracy. If they were feudal, how did their respective governments work in a feudal system. If they weren't, how did they raise armies and such?
However, nearly all its neighbors were operating under Feudal systems, so when necessary for the purposes of interacting with them, the Doge was roughly reckoned as a Duke. That is in fact where the word "Doge" (Venetian "Doxe") came from. Its Venetian for "Duke" (Latin "Dux").
Of course the line between Oligarchy and Republic is quite fuzzy. Likely the franchise in Venice wasn't significantly more restricted on a per-capita basis than that of 1788 South Carolina (a plantation society where voting required property ownership).
The Medieval Papal State, was a different beast. While the leadership position was appointed (calling it "elected" would be a bit of a stretch during that era), and had some obvious religious administrative responsibilities that most European states didn't have to deal with, the state itself operated much like any other medieval duchy. This includes raising armies and invading neighbors from time to time. The "clergy" involved in this election were typically puppets of whatever ruler owned the land they were sitting on, and the popes they elected were often just that ruler's younger-son relatives.