"Enoch Soames: A Memory of the Eighteen-Nineties", a novelette by Max Beerbohm, available at Project Gutenberg. This story was the subject of my old question Vision of the future in Max Beerbohm's "Enoch Soames".
Wikipedia plot summary:
Writing as a narrator describing events from his own past, Beerbohm presents himself as a moderately successful young English essayist during the 1890s. He then relates the tragic history of an older colleague named Enoch Soames. The son of a bookseller from Preston, living off an inherited annuity, he is an utterly obscure, forgettable aspiring poet in the Decadent manner. Over the course of the story, he authors three unsuccessful books, of which Beerbohm provides parodies of his book of poems, "Fungoids". Soames’ appearance is described as “dim” and leaves little impression, except for his persistent habit of always wearing a particular grey waterproof cape and soft black hat.
On the afternoon of 3 June 1897, Soames and Beerbohm are having lunch in the Soho-based "Restaurant du Vingtieme Siecle". The self-obsessed Soames is deeply depressed, consumed with the belief that he is an unrecognised great author and, despite his complete failure so far, keenly curious about his "certain" posthumous fame. He therefore agrees to a contract offered by the Devil, who introduces himself from a neighbouring table. In exchange for the possession of his soul, Soames will be transported exactly 100 years forward in time to spend the rest of the afternoon in the British Museum Reading Room and discover what judgement posterity will make on himself and his works. After the allotted time has expired, Soames will be returned to their present date and location, but at the same time of evening as his departure from the future, and the Devil will then collect his payment.
Soames then vanishes and reappears in the café at the designated hour, where Beerbohm has returned to meet him. Soames’ description of the world of the future is vague and nondescript; while there he had focused primarily on his own concerns. He tells Beerbohm that the only mention he could find of himself was in a single scholarly article, of which Soames produces a facsimile-copy. It is printed in English, but in a phonetic spelling and with modified pronunciation, both of which had apparently evolved during the intervening century. The article discusses a "labud sattire" written by one Max Beerbohm "in wich e pautraid an immajnari karrakter kauld Enoch Soames — a thurd-rait poit hoo beleevz imself a grate jeneus an maix a bargin with th Devvl in auder ter no wot posterriti thinx ov im!" (in which he portrayed an imaginary character called Enoch Soames—a third-rate poet who believes himself a great genius and makes a bargain with the Devil to know what posterity thinks of him).
Beerbohm is shocked and denies that he would ever write such a thing. Before being taken to Hell, on the Devil’s return, Soames scornfully requests that Beerbohm at least try to make people believe that he, Soames, actually existed. Beerbohm’s narrative is that justification. He notes in particular that Soames mentioned that his presence in the reading room had caused a great stir, but "I assure you that in no period could Soames be anything but dim. The fact that people are going to stare at him, and follow him around, and seem afraid of him, can be explained only on the hypothesis that they will somehow have been prepared for his ghostly visitation. They will have been awfully waiting to see whether he really would come. And when he does come, the effect will of course be – awful."