Ever since WWII, Nazis have been one of the most popular villains in mediums ranging from books to video games. Prior to WWII, was there another person or group who was similarly and nearly universally recognized as the global "bad guy?"
This is fairly subjective, but you could make an argument for "The Yellow Peril" - i.e. the threat posed by Asian nations (specifically Japan and China) to "Western" civilizations. This was fairly explicitly a racist as well as cultural concept, and developed following the success of Western powers at imposing themselves on China in the Opium Wars (1839-1860) and the United States expedition to force open trade relations with Japan by Commodore Matthew Perry (1853), and followed by immigration from Asian countries into Europe and the United States during the 1870s-1900s; it could be fairly said to have sparked after the surprising defeat of Russia (a European/Western/white power) by Japan in the Russo-Japanese War (1905).
Prior to the 1880s, "Orientalism" in literature had generally focused on exoticism; the portrayals of native peoples were not always flattering, but highlighted the unusual and elaborate (from Western point of view) differences in lifestyle, art, culture, and religion. This began to merge with Colonialist attitudes as European powers made inroads into Asia, especially British involvement in India and China.
In fiction, the prototypical work was The Yellow Danger; Or, what Might Happen in the Division of the Chinese Empire Should Estrange all European Countries (1898) by M. P. Shiel, which provided direct inspiration for archetypical Yellow Peril villain Dr. Fu Manchu by Sax Rohmer, who began to chronicle his attempts at world conquest in The Mystery of Dr. Fu-Manchu (1913) (published in the US as The Insidious Dr. Fu-Manchu). The Russo-Japanese war provided the direct context for works like The Yellow Invasion (1905) by Émile Driant and The Unparalleled Invasion (1910) by Jack London. Nor did the "Yellow Peril" threat die down following World War I; "Yellow Peril" villains continued in the pulps in the 1920s and 30s, and Sax Rohmer's infamous villain was adapted into comic books - the trope was briefly intensified by Japan's participation in World War II, and continued in modern media until relatively recently - the Mandarin in the Iron Man comic books, for example, was a Yellow Peril villain based off Fu Manchu (who also appeared independently in Marvel comics).
"Yellow Peril" literature fed a lot of ethnic and racist stereotypes, as well as insecurity about white/Western/European/American supremacy on the world stage. There were a lot of overtones of inevitable apocalyptic conflict and moral superiority, as well as xenophobia and cultural snobbishness, and it lasted a long time - like anti-Semitism - and it had real consequences, such as the Immigration Act of 1917 in the United States, which banned immigration from Asian countries ("Asiatic Barred Zone").