I see no reason to think that there was a U-turn in Church teaching or that any of the Pope's involved were wrong. The decree in 1616 was right. The change to the Index in 1820 was also right because the situation had changed. Pope Leo XIII wrote in continuity with his predecessors who allowed this change. This had nothing to do with causing modernism. The idea of interpretting Scripture in non-literal ways to reconcile it with science goes back to St. Augustine and St. Thomas Aquinas. If this idea was harmful, surely the harm would have occured before the rise of modernism.
Modernism was caused by the twisting of Catholic teaching to incorporate Enlightment ideas. The Enlightment, in turn, was made possible by the attack on Church authority by the Protestant "Reformation".
As Ladilaus has also pointed out, here are so many contradictions above it is difficult to address them. 'The change to the Index in 1820 was also right because the situation had changed. Pope Leo XIII wrote in continuity with his predecessors who allowed this change.' Are you a heliocentrist jaynek? Only a heliocentrist could make such a comment. What exactly do you think began the 'enlightenment?
‘For over three and a half centuries, the trial of Galileo has been an anti-Catholic bludgeon wielded to show the
Church as the enemy of enlightenment, freedom of thought and scientific advancement. In the cultural wars of our own day, Galileo has become an all-encompassing trump-card, played whenever the discussion is over science, abortion, gαy rights, legalised pornography, or simply as a legitimate reason for blatant anti-Catholicism.’--- Robert Lockwood (Robert Lockwood: The Galileo Affair, Position Papers, May 2001.)