Nothing I find about the coat of arms seems to even acknowledge the similarity to the flag of Sweden. Is it merely coincidental?
Edit: I think I answered my own question. From Wikipedia. It was actually adopted upon his ascension to bishophood in 1958:
Wojtyła adopted his coat of arms in 1958, when he was created bishop, but with the charges in black instead of gold. As this violated the heraldic "tincture's canon" (black on blue, color on color) upon Wojtyła's election as pope, Vatican heraldist Monsignor Bruno Bernard Heim suggested he replace black by gold. The design shows the "Marian Cross", a cross with a capital M for Mary inscribed in one quarter, recalling "the presence of Mary beneath the cross"
So, I suppose that the modified coat of arm's similarity to the flag of Sweden was deemed an acceptable compromise in favor of keeping with the tincture's canon. (If they even noticed, that is!)
Apparently a coincidence. From https://www.liguorian.org/files/Liguorian_JPII_intro.pdf
THE COAT OF ARMS OF POPE JOHN PAUL II features a gold cross set against a blue backdrop. The cross represents the central Christian mystery of the Redemption. The vertical part of the cross has been shifted slightly to the left to make room for the majestic capital M, which reminds us of Mary’s presence at Jesus’ death on the cross. The motto of John Paul II, which accompanies his coat of arms and expresses his devotion to Mary, is the simple Latin expression “Totus Tuus.” It means “Totally Yours!” Located directly behind the pontiff’s personal coat of arms are the symbols of papal authority: the tiara and the keys of Saint Peter. The papal tiara, or triregnum, is formed of three crowns and symbolizes the triple power of the pope, for he is father of kings, governor of the world, and Vicar of Christ. The keys, which represent those given by Christ to the apostle Peter, are
crossed and tied with a cord. Since the fourteenth century, the two crossed keys have been the official insignia of the Holy See.