Argh! Fuzzyboots mentioned the Cthulhu Mythos before me.
I remember a shared world project that might possibly have a similar date as Thieves World. I remember reading a story in a magazine set on the same planet as a story by another author and wondering what was up. It turned out that it was a shared universe. I later read a collection of stories set on that world and noted that the writers did not agree on how many limbs the "fuxes", the people of that world, had.
I now believe the anthology was Medea: Harlan's World (1985), edited by Harlan Ellison. Several of the stories were published as early as 1978. And articles describing Medea were published as early as 1975. -
https://www.isfdb.org/cgi-bin/pl.cgi?21794[1]
In Tarzan Alive (1972) Philip Jose Farmer (1918-2009) created the "Wold Newton Family" by claiming that many fictional characters created by other writers had mutant powers because of being descended from a group of related and intermarried travelers who were exposed to radiation from the famous Wold Cottage Meteorite on December 13, 1795. The "Wold Newton Family" has since been expanded into the "Wold Newton Universe" by Farmer, Win Scott Eckert, and others.
Eckert also created a Crossover Universe in Crossovers: A Secret chronology of the World (2010).
https://en.wikipedia.org/wiki/Wold_Newton_family#The_Wold_Newton_Universe[2]
Fletcher Pratt (1897-1956) made his novel The Well of the Unicorn (1948) a sequel set several generations later to Lord Dunsany's play "King Argimenes and the Unknown warrior" (1914).
Ambrose Bierce (1842-1914?) wrote "An Inhabitant of Carcosa" in 1886. Robert W. Chambers (1865-1933) mentioned Carcosa in several of the short stories collected in The King in Yellow (1895). The King in Yellow was a character in a fictional play called The King in Yellow set in Carcosa, which may be on another planet. Carcosa became part of the Cthulhu Mythos.
And no doubt there are older examples.
Arrgh! Again! eshier beat me to mention the shared world anthology The Petrified Planet (1952) edited by Fletcher Pratt (see above).
And also see my answer and other answers to this question: Who was the first author to rework another scifi/fantasy author's character? 3
It is possible that the sequels to Amadis de Gaula, medieval Arthurian romances, medieval saint's lives, or ancient Greek epic poems could be considered the first shared fictional universes.
Added April 11, 2021.
There is a type of story called a round-robin story.
A round-robin story, or simply "round robin," is a type of collaborative fiction or storytelling in which a number of authors write chapters of a novel or pieces of a story, in rounds. Round-robin novels were invented in the 19th century, and later became a tradition particularly in science fiction. In modern usage, the term often applies to collaborative fan fiction, particularly on the Internet, though it can also refer to friends or family telling stories at a sleepover, around a campfire, etc.
https://en.wikipedia.org/wiki/Round-robin_story[4]
One example in the fantasy genre is "The Challenge from Beyond", by H.P. Lovecraft, C.L. Moore, Abraham Merritt, Robert E. Howard, and Frank Belknap Long, published in Fantasy Magazine in 1935.
https://lovecraft.fandom.com/wiki/The_Challenge_from_Beyond[5]
https://en.wikisource.org/wiki/The_Challenge_from_Beyond_(Moore,_Merritt,_Lovecraft,_Howard,_and_Long)[6]
And the most famous science fiction example is Cosmos.
Cosmos is a serial novel consisting of seventeen chapters written by seventeen authors. The novel appeared in issues of the science fiction fan publication Science Fiction Digest (later Fantasy Magazine) published from July, 1933 through January, 1935.1
Cosmos has been described variously as "the world's most fabulous serial,"2 "one of the unique stunts of early science fiction,"3 and "a failure, miserable and near-complete."4
https://en.wikipedia.org/wiki/Cosmos_(serial_novel)[7]
https://en.wikisource.org/wiki/Cosmos_(serial_novel)[8]
I am not certain if a round-robin story counts as a shared universe, but if it does, Cosmos may be th earliest example in science fiction.