I have heard that the Catholic Church helped Nazi escape to South America via the Ratline and helped them with hunting down Jews despite them having problems with the Nazis. Also wasn't one of the former popes was in Hitler's youth?
The answer would depend on how one defines "the Roman Catholic Church" and "ratlines." If you are talking about the Catholic Church as a monolithic entity with top-down control, then there was no such effort to help Nazis escape justice. Roughly 12 million refugees were helped by the Catholic Church in the aftermath of WWII, and some people took advantage of this to flee from prosecution. The Vatican was concerned with helping refugees and was less concerned with war criminals. The accusations of "Vatican ratlines" are largely unsubstantiated.
As Ventresca states in his biography of Pius XII,
Despite the seductive allure of its sensationalistic elements, the damning indictment of Pius XII's purported involvement in the so-called Vatican ratlines rests on shaky foundations. In fact, there really were no Vatican ratlines as such. Claims to that effect have long been based on highly selective reading of partial and sometimes dubious intelligence reporting of the immediate postwar effort. There simply is no direct, credible evidence to prove that Pius XII knew of such schemes or that he personally approved and helped to finance them using funds from, among others, charitable donations for postwar relief efforts. Given his propensity for caution and probity, it seems unlikely that he would have dared to authorize such questionable operations, fraught not only with ethical but also with strategic and symbolic dangers for the Holy See and for all of Catholicism. (Pg 268)
There were other members of the hierarchy and clergy that did abuse their positions to give aid to war criminals. Perhaps most infamous among them was Bishop Alois Hudal, who helped many infamous Nazi officials flee from Europe. Another example is Father Krunoslav Draganovic. These were Catholic Church officials, but they acted without sanction or approval of the Vatican. Hudal and Pius XII were estranged after the war, and Hudal remained bitter toward the pontiff for the rest of his life.
So what "ratlines" existed were created without approval or encouragement from the Vatican, and when abuses were found there were attempts made to correct them.
Regarding Benedict XVI's (then Joseph Ratzinger) involvement in the Hitler Youth, he was inducted at the age of 14--and this was mandatory. He apparently did not attend the meetings and was less than enthusiastic about his membership. While in seminary he was drafted into the army and later deserted. If we are to castigate Benedict for being in the Hitler Youth we would also have to castigate all 14 year old and older males in Germany at that time.
For more on the Pius XII and the Catholic Church in WWII my earlier answer may be of interest.