[This question is about popular conceptions and therefore goes into strange directions, don't get too shocked]
The notion of spacetime can be traced back to roughly the 18th century where some people like Lagrange and d'Alembert started to idly speculate about time and space being part of a same whole, and we can consider its official birth to be that of Minkowski's paper on the topic in 1908, but however there exists a rather uncertain era in between the two where time as a fourth dimension seems to occasionally pop up.
The obvious intermediary step in between would be for instance Hamilton's theory of quaternions, but there are however some weird outliers as well : H. G. Wells' "The Time Machine" in 1895 refers to spacetime, quite right at the beginning, ie :
“Now, it is very remarkable that this is so extensively overlooked,” continued the Time Traveller, with a slight accession of cheerfulness. “Really this is what is meant by the Fourth Dimension, though some people who talk about the Fourth Dimension do not know they mean it. It is only another way of looking at Time. There is no difference between Time and any of the three dimensions of Space except that our consciousness moves along it. But some foolish people have got hold of the wrong side of that idea. You have all heard what they have to say about this Fourth Dimension?”
The influences of this are quite hard to find. In a much more general direction, the notion of a fourth dimension in general seems to have been popularized by among other people Zöllner's "Transcendental Physics" in 1875[1], in which he tries to tie the notion of higher dimension to supernatural forces, an idea which is found in later popular books like Blavatsky's Secret Doctrine, or C. W. Leadbeater's book on remote viewing. In particular, Schofield's book "Another World"[2] seems to reference Mr. Wells [I assume it is H. G. Wells here] in 1905,
Many speculations concerning the fourth dimension have been made since this book was first issued, notably that by Mr. Wells that it is " Time."
Making it seem as though this was a well known idea at the time, at least within some circles.
The idea of a fourth dimension also comes up in Charles Hinton's writings on the topic in 1880[3], including a method of visualizing the fourth dimension which uses time as an analogy for the fourth dimension, although he does not seem to actually say that the fourth dimension itself is time. Flatland appears a few years later with much similar ideas on the topic.
Did H. G. Wells have some kind of notion of spacetime that he commonly talked about outside of his stories, and do we know where that idea came from exactly?
Edit : Some hints from Wells' autobiography :
In the students' Debating Society, of which I will tell more later, I heard about and laid hold of the idea of a four dimensional frame for a fresh apprehension of physical phenomena, which afterwards led me to send a paper, "The Universe Rigid," to the Fortnightly Review (a paper which was rejected by Frank Harris as incomprehensible), and gave me a frame for my first scientific fantasia, the Time Machine, and there was moreover a rather elaborate joke going on with Jennings and the others, about a certain "Universal Diagram" I proposed to make, from which all phenomena would be derived by a process of deduction.