So the immediate answer to your question is that pre 1900's climate data comes from a variety of sources. The instrumental record actually goes back at least as far as 1850 (That is how far the Koch Brothers/ Berkeley data set goes for instance. ) predating that, when we look at time scales of millions of years we have to use various proxies Which ones are used and how precise they are depends how far back in time you go. The geologic time record goes back at least far as 500 million years
On twitter you rightly point out that extrapolation of future results based on past results is invalid. Even if we did have 4 billion years of perfect climate record, we would not be able to just fit a trend curve or line to that data and predict the next 100 years of earth's climate. You state on twitter that this past climate data is the