Ex-Russian/British/Spanish empire countries still know/speak Russian/English/Spanish but almost none of the Ottoman Empire subjects outside Turkey know/speak Turkish. Why?
It is mostly about the social, economic, cultural power of the Ottomans in the 19th century.
There were many non-Turk ethnicities (Greeks, Armenians, Albanians, Jews, Serbs, Bulgarians, Arabs) in the Turkish heartland (land of Turkish majority e.g. Eastern Rumelia, most of Anatolia, and Istanbul). In those regions Turkish can safely be assumed to be the secondary language of those minorities. Many influential figures of the nations that later broke away from Ottoman Empire, were educated in Istanbul and, ironically, versed better in Turkish than average illiterate Turk. Muhammad Ali Bey al-Abid, Faik Konica, David Ben-Gurion, Stoyan Mihaylovski, Zeid bin Hussein, Zog I of Albania, Aram Andonian are the ones I found with few clicks.
However, the prominence of Turkish cannot be generalized to the rest of the empire. Despite some attempts, comprehensive education did not exist for Turks and non-Turks alike. General Muslim literacy rate was about 2–3 percent in the early nineteenth century and perhaps 15 percent at the end. Non-Muslim rates were not much better. Total circulation number of Ottoman newspapers were tens of thousands, at best. In Britain, this figure was easily in millions.
Thanks to liberal and free-trade agreements of 19th century, many ethno-religious groups had acquired social and economic privileges. They were able to have their own religious, missionary and privately funded schools. However, the emphasis was on European and national languages, for the better integration into global trade and national awakening, respectively. I had read memories of Leon Sciaky, Ottoman Sephardi Jew who lived in Salonica in the late 19th/early 20th century. Although his merchant family afforded him private Spanish (his mother language), French, English, piano, Math classes, he picked up a meager Turkish on the street while buying bread and playing with other children. He did not have to learn more than that.
Pluralistic judicial system is another reason. Although Sharia courts recorded in Ottoman Turkish held the precedence on the paper, each religious community maintained its own courts, judges, and legal principles for the use of coreligionists. In Arab regions, court records were in Arabic. It was decided to make Turkish as late as WWI, just before they were ceded. Most of Ottomans did not have to learn Turkish for judicial affairs.
To sum up, there were always non-Turkish elites who relied on Ottoman state and they obviously knew Turkish for communication. Even today, Al-Turki among Arabs or some Slavicized version of Turkish words in Balkans are common last names. However, merchant elites of 19th century tend to have greater interaction with European trade network than Ottoman center and this was reflected on their choice of language acquisition. Comprehensive education of mass populations was only achieved by successive nation-states.
Edit: I forgot to add the source.
The Ottoman Empire,1700–1922 by DONALD QUATAERT