There has been a single lingua franca across all of China since at least the Han Dynasty, perhaps even the Warring States period or earlier. It has variously been called 通語 (the mass/common/omnipresent/intelligible language, 通 is a bit difficult to translate here), 官話 (the official language), potentially 雅言 (elegant speech, this is more controversial and earliest mention) and now 普通话 or 國語.
> Indeed, before the 20th century the idea of a singular, spoken Chinese language was a foreign concept
Matteo Ricci explicitly talks about a single language he can use to talk with everyone in every province (in his time this was the 官話). And indeed he used the same language as he made his way across the entire coast of China. There is an entire Han Dynasty compendium of the vocabulary of various regions that compares it against the official lingua franca. Indeed the title of this work is exactly Fangyan!
> But while Chinese thinkers frequently mentioned ‘official languages’, this was by no means synonymous with a ‘national language’ – a language unified in its sound and script used by and representative of a Chinese nation.
These "official languages" were exactly unified in sound and script and representative of a Chinese nation! The language Ricci encountered was the descendent of one whose pronunciation was explicitly codified (there are some asterisks here I can elaborate on if people are interested) in the 14th century 洪武正韻 (Hongwu Proper Sound), and was passed to neighboring kingdoms as the official language (and is e.g. preserved in Korean rime books on the Chinese language).
The difference in the last 100 years has been a difference in degree rather than kind. With the advent of near-universal education and literacy and the technological tools offered by mass media, the PRC, ROC, and to a lesser extent places like Singapore and Malaysia can more effectively carry out the language programs that have been attempted in the millennia past.
Granted the difference in degree is vast: the tools at the disposal of political regimes today absolutely dwarfs those of the past. This also means the effects of standardization are far more keenly felt. However, the motivation and policy is one with a long and winding history.
It follows a standard story of varying unification and disunity both linguistically and politically that has played out many times in China's history.