One of the most remarkable works on the subject of meaning (or lack thereof) in history has to be Karl Lowith’s book precisely with that name.
There, Lowitz demonstrates how all teleological, that is finalistic, readings of history are ultimately rooted in the Bible and the religious idea of the jews and christians. I would go even further and add that such idea can even be traced back to the religion of prophet Zaratustra, a fascinating and mysterious figure.
To discern meaning in history is a challenging task that can lead to ideological and dogmatic readings of existence. That is something we all should try to avoid, not only because we know where that can lead – and has indeed led during the 20th century – but also because it prevents us to understand reality in time as it unfolds. Ideological readings tend to impose our own preconceptions to facts and to try to conform reality to what we think. To be sure, we do need concepts and our understanding of reality depends on a certain level of generalisation and theorization. Otherwise we would be limited to dull and useless descriptions of reality. Synthesis do help us to understand this world of multiplicity and dispersion. But these need to be rooted in reality and not in linguistic fictions or closed systems.
Going back to Lowith, his main thesis would be somewhat banal if he was referring to the philosophy of history of Saint Augustine or Hegel alone. That is not the case though. Lowith presents a very sound (some would say irrefutable) case for how even authors like Buckhart, Comte and Marx himself were working within a mental framework that can be traced back to the judeo-christian idea of history and salvation. And he does so in an extremely elegant way, making this reading extremely light and pleasurable. Plus, his presentation of these authors ideas is really enriching, even if you are already familiar with their thought.
I will return to this topic in the future, but for the time being I would just say that ultimately the existence of meaning in history is a religious question. If you only believe in matter and think all is chance, then there is no purpose on anything, except perhaps to be good to others. On the other hand if you believe that in some shape, way or form there is (a) God, or a superior intelligence, then there is a certain order to things and a meaning that, although not necessarily discernible (our span of life is way too short and our awareness of the dimension of reality is way too limited for finalistic theories), we should seek to attune to.