alternatehistory.com

Post the Charlemagne and prior to the Reformation medieval bureaucracies aka chanceries tended to be staffed and dominated by clerics. For example every Lord Chancellor of England prior to Thomas More was a cleric. Which along with piety explain why so much land and wealth ended up in the hands of the church. So your challenge is to have a major Catholic Kingdom (so not Venice or Genoa which as merchant Republics were different) have a professional secular bureaucracy of reasonable scope and efficiency in Western Europe.
Top