Even some on the right use this, talking about the "ash heap of history" where failed ideologies and systems go to be judged as worthless
Now, most people are concerned with their legacy, even if its a modest one. We want to be looked back upon with fondness by those who come after, or at least not simply forgotten. The accusation that unless we toe the line people will think ill of us on the future can be a powerful agent of shame.
Yet the entire concept is flawed and ultimately ridiculous. Think this through a moment.
No matter who you are, you either believe there is some sort of afterlife, or you do not. You either think you'll be rewarded (or punished) in a future life beyond this one, or you think you will die and be gone forever. Even people who believe in karmic reincarnation believe ultimately in an afterlife that is separate from this world, be it nirvana or some similar principle.
So either you'll be beyond the judgement of future generations in a cosmic future... or you'll just be gone and dead. And either way it will not matter to you. If you believe in an afterlife, then the judgement of your fellow man is utterly irrelevant; you're held to an objective standard. That is, you will be judged by something other than humanity. If you don't believe in an afterlife, you're going to be a rotting corpse and gone so the opinions of the world don't matter a bit.
It simply doesn't matter what "history" judges us like. They likely won't care a bit about you or I individually in any case. We're too irrelevant and insignificant for historians to even be aware of.
The second biggest flaw of the "history will judge you" argument is that it presumes some things which are not reasonable or consistent with the past. The entire case is built around an assumption that the world will get better, people more morally enlightened, and humanity more progressive. Whether this is based on some sort of mistaken principle of evolution (remember: evolution doesn't say creatures get better, it proposes that creatures become more able to survive in their environment), or based upon an ideology of infinite progression toward utopia, there's absolutely no reason to believe that's how things will turn out.
In fact, humanity is, based on past experience and human nature, more likely to become worse off than better. There's no principle that makes it reasonable to expect humanity will be better tomorrow than today, or the next day, or the next generation. Each generation has its positive and negative aspects. Each generation has things they learn from and avoid in the past, and pitfalls previous generations avoided.
There's zero evidence that humanity is becoming innately better, only that we're becoming richer and fatter and happier. Slavery has been largely abolished as an institution around the world, but other vices such as sloth, selfishness, and ignorance have become more entrenched. For every positive we've achieved, there's a negative side. We developed nuclear power... and nuclear weapons. We came up with a way to clear roads, and bombs. We have vaccines for deadly diseases... and bio weapons.
History isn't a continual, obvious slope upward to greater enlightenment in any view of humanity's existence. There are some ups, a lot of downs, but no general obvious trend; certainly not one that favors one ideology or another. The left wants to believe that their enlightened genius will certainly and absolutely lead to universal agreement with what they think today, but there's no reason for that presumption. The right wants to believe that the word of God and obvious logic will lead the future to believe their way, but there's no reason to believe that either.
Holding a certain ideological position today might be judged as brilliant in the future, or reprehensible. 30 years ago homosexuality was considered repulsive and even a mental illness. Ten years ago, people mocked the very idea of homosexual marriage. Now unless you're fully and vocally in support, you're a monster. Even homosexuals used to consider homosexual marriage a bad thing not so long ago - it was considered a heteronormative oppression, trying to force that lifestyle on their alternate life. There's no reason to presume that tangent continues one direction or another.
Another flaw is that historians are not especially enlightened, noble, and pure people. They have their agendas, their ideology, and their perspectives as well. Read about Oliver Cromwell some time. Its impossible to find an objective, dispassionate examination of the man's life. He's either portrayed as a horrific demon (as the king that came after him made sure of) or he was a brilliant visionary doing God's work. Historians judge him based on their perspective of events and people.
Compounding this problem is that historians are sometimes, perhaps often, wrong. I've got a long running series with over fifty examples of how things we're all sure of and were taught are not the way it happened. From Pyramids, to the Columbine Shootings, to Radon Gas, we've been fed a bill of goods by historians. And some historians, such as Howard Zinn write not to give the facts, but to push an agenda, no matter what distortions, omissions, and lies he has to use to get there.
The presumption that the future will look back at us with precise and accurate clarity and moral excellence is simply ridiculous. Historians will judge us a hundred different ways, arguing with each other, and while one position might gain ascendency or majority support, that doesn't mean it will be accurate, well-informed, or devoid of ideological slant.
WHO ARE YOU
And if you think about it, why does history judging us even matter? Who cares what historians think about us. What difference does it make what the majority of a select group of academics and elites say? Who cares, ultimately, what even the majority of humanity thinks?
You know who was on the wrong side of history based on this principle? Jews during WW2. They had lived in Europe for over a thousand years and tried to fit in while holding to their religion and beliefs. In, but distinct from, the cultures around them. Then the historians, the elites, the academics, the leaders, the government, and the majority of people living in the Nazi regime judged them not just weird but corrosive, evil, and corrupt. Jews were on the wrong side of history. In fact, they've been on the "wrong side of history" over and over again for thousands of years, and its heading that way again, from many signs out of Europe.
Because the idea of "history" judging people isn't some noble principle of academic surety, but just a future consensus. "History" isn't an entity we can rely on to make proper calls on moral issues, but just how most people figure it went or should have been. We look back on some things as awful and praise others, but that doesn't make the one evil and the other good. Our judgment is just as flawed and troubled now as it was back then. We're not better people now, we just have nicer toys.
The only judge that can be relied on for true and absolutely trustworthy discernment of our lives and behavior would have to be someone better than us. Someone outside of humanity, not held by its weaknesses and trials. Someone transcendent from humanity; other. Someone with ultimate wisdom and clarity of thought, someone who didn't just know what took place, but why, and what would have happened if things had gone differently. Someone who knows not just what we did but why and what was in our hearts.
Being judged by history is utterly irrelevant. If what you're doing is the right thing, then history's judgment does not matter. If what you're doing is wrong, then its wrong no matter how history judges it. Right and wrong is not based on some presupposed future consensus view.
I don't care how history judges me. Neither should you. Both of us should worry about someone greater than history being a judge.