It's not really fair to say that the Islamic world "shifted" from caliphs to kings--most political leaders did not take the title "king," in Arabic al-malik, in Islamic history. Most of the major political leaders instead had the title "sultan," which means "military leader." Very often after the Turkish conquests of the eleventh century, you would have a sultan, or several, leading the Muslim armies in the field against the Byzantines, the Crusaders, and other Turks or Mongols, while the caliph would have been back home in Baghdad or another caliphal city as the religious and ostensible political leader; however, if the caliph made a decree, they would then use the sultans as their means of ensuring those laws were being followed. During the Ottoman Empire, the heir of the house of Osman had the title "sultan." I think it was Mehmed I that started claiming the caliphal title, but when Selim I conquered the Mamluks and thus gained control of the Hejaz, particularly Mecca and Medina, it gave him the title of "Protector of the Holy Places," and thus reinforced his claims to being caliph. The Ottoman rulers maintained the title of caliph until the Young Turks rebellion, which greatly secularized the Ottoman Empire, and then ultimately resulted in the fall of the Empire and establishment of the Republic of Turkey. Essentially, Islam has seen the caliph as being the major leader, who is sometimes in need of individuals who can administer for him, including sultans, emirs, viziers, etc.
As far as religious obligations of Muslim rulers, I would argue that, at least in jurisprudence, their responsibilities did not change very much. According to Islamic teaching, it is the responsibility of the political leader to ensure the protection of the umma, or Islamic community, and to keep Islam safe from any heresy or unorthodoxy. This frequently lead to the caliph financing the establishment of madrasahs, schools designated for the study of the Qur'an and Islamic law. Similarly, they were responsible for keeping peace in the community, and this protecting the dhimmis, or the non-Muslim peoples living in Islamic territories, mostly Christians and Jews (Christian Europe had the same view that political leaders were responsible for keeping Jewish communities in their lands safe, particularly for the sake of keeping peace). Some may have argued for the external jihad to expand Islamic territory, but that was not a universal perspective. Theoretically, they were the central rulers and administrators of the Islamic community and territory, but, especially during the 'Abbasid period and the Turkish and Mongol conquests, we see that the caliphs often take a more ceremonial role or merely become figureheads.