There are two issues at play here:
- Did the Ministry know that the Tom Riddle who had accused Hagrid was identical with the "dark wizard, terrible person" Lord Voldemort?
- If they did know, would that make a difference?
To address the first issue, we can turn to Dumbledore's comments at the end of Chamber of Secrets:
"Very few people know that Lord Voldemort was once called Tom Riddle. I taught him myself, fifty years ago, at Hogwarts. He disappeared after leaving the school... traveled far and wide... sank so deeply into the Dark Arts, consorted with the very worst of our kind, underwent so many dangerous, magical transformations, that when he resurfaced as Lord Voldemort, he was barely recognizable. Hardly anyone connected Lord Voldemort with the clever, handsome boy who was once Head Boy here."
Thus, it is certainly possible that the Ministry, including Fudge, did not make the connection between Tom Riddle and Voldemort. In their minds, Hagrid had been accused by the best student at the school, and nothing had ever repudiated that.
To address the second issue, we can first point to the general sorry state of the wizarding justice system, as discussed in the answers to this question. Additionally, it is certainly possible to know that Tom Riddle ended up as Voldemort, yet still not invalidate everything Tom Riddle did. Even those who might have known that Tom Riddle and Voldemort were the same person, would likely not have known the extent of his depravity already as a child. They may have assumed that he lost his way when he got older, but that what he did as Tom Riddle was still part of the "exemplary student" persona. So if the justice system allows for convicting Hagrid based on the single testimony of a teenager, it is possible that it would also not take into account that the person testifying later became the worst Dark wizard in town. Thus, contrary to the premise in the question, this acknowledgement would not prove that Hagrid was innocent.
If we do assume that the Ministry was not aware that Tom Riddle was Voldemort, and therefore had no problem using his testimony to convict Hagrid the second time, we might wonder why Dumbledore who was intimately aware of Riddle's life story did not say anything. Why didn't he tell the Ministry that the only accusation against Hagrid came from the most feared mass-murderer in the world?
The answer to this may be that, as we find out later in the series, Dumbledore is very secretive when it comes to all things Voldemort related. This probably ultimately comes down to the statement in Chapter Ten of Half-Blood Prince where he says:
It would not be a good idea if word got around how much I know, or suspect, about Lord Voldemort's secrets."
Dumbledore may have felt (whether you agree with him or not) that Hagrid going to Azkaban was a necessary sacrifice in order to keep the information secret. He also may have realized that in due course the truth would come out, so Hagrid's incarceration would be short-lived. In fact, if Hagrid was asked, we might even expect him to acquiesce to a short stint in Azkaban (despite how much he hates it there) in order to protect Dumbledore's goals for the greater good.