The superlatives around Kings Hezekiah and Josiah concern the fact that they were the only Judaic kings who promoted monotheism.
Kings of Israel
All the kings of Israel, the northern kingdom, were portrayed as evil polytheists, for example:
1 Kings 16:30,33: And Ahab the son of Omri did evil in the sight of the LORD above all that were before him... And Ahab made a grove [emblem of the goddess Asherah]; and Ahab did more to provoke the LORD God of Israel to anger than all the kings of Israel that were before him.
Kings of Judah
The Book of Kings is more circumspect in regard to the royal family of Judah. In some cases, they are described as polytheists, but in other cases this can only be deduced by a careful reading of the texts.
Those kings regarded by the author of Kings as totally reprehensible include Hezekia's predecessor, Ahaz, and Hezekia's son, Manasseh, who are both described as sacrificing their own sons by fire and of worshipping in the 'high places':
2 Kings 16:2-4: Twenty years old was Ahaz when he began to reign, and reigned sixteen years in Jerusalem, and did not that which was right in the sight of the LORD his God, like David his father. But he walked in the way of the kings of Israel, yea, and made his son to pass through the fire, according to the abominations of the heathen, whom the LORD cast out from before the children of Israel. And he sacrificed and burnt incense in the high places, and on the hills, and under every green tree.
2 Kings 21:1-6: Manasseh was twelve years old when he began to reign, and reigned fifty and five years in Jerusalem. And his mother's name was Hephzibah. And he did that which was evil in the sight of the LORD, after the abominations of the heathen, whom the LORD cast out before the children of Israel. For he built up again the high places which Hezekiah his father had destroyed; and he reared up altars for Baal, and made a grove, as did Ahab king of Israel; and worshipped all the host of heaven, and served them. And he built altars in the house of the LORD, of which the LORD said, In Jerusalem will I put my name. And he built altars for all the host of heaven in the two courts of the house of the LORD. And he made his son pass through the fire, and observed times, and used enchantments, and dealt with familiar spirits and wizards: he wrought much wickedness in the sight of the LORD, to provoke him to anger.
Of Josiah's son, Jehoahaz, he has this to say:
2 Kings 23:32: And he did that which was evil in the sight of the LORD, according to all that his fathers had done.
Hezekiah
The Deuteronomist lauded Hezekiah and described how he attempted to remove all images of the old gods:
2 Kings 18:1,3-5: Now it came to pass in the third year of Hoshea son of Elah king of Israel, that Hezekiah the son of Ahaz king of Judah began to reign... And he did that which was right in the sight of the LORD, according to all that David his father did. He removed the high places, and brake the images, and cut down the groves, and brake in pieces the brasen serpent that Moses had made: for unto those days the children of Israel did burn incense to it: and he called it Nehushtan. He trusted in the LORD God of Israel; so that after him was none like him among all the kings of Judah, nor any that were before him.
Josiah
It was King Josiah who is believed to have commissioned the Book of Deuteronomy and the Deuteronomistic History, including the Books of Kings.
Josiah imposed monotheism and centralised worship in the Jerusalem Temple, where close control could be ensured, and even invaded Samaria and took away all the temples (houses of the high places) and killed their priests:
2 Kings 23:3-4: And the king stood by a pillar, and made a covenant before the LORD, to walk after the LORD, and to keep his commandments and his testimonies and his statutes with all their heart and all their soul, to perform the words of this covenant that were written in this book. And all the people stood to the covenant.
4 And the king commanded Hilkiah the high priest, and the priests of the second order, and the keepers of the door, to bring forth out of the temple of the LORD all the vessels that were made for Baal, and for the grove, and for all the host of heaven: and he burned them without Jerusalem in the fields of Kidron, and carried the ashes of them unto Bethel.
2 Kings 23:19-20: And all the houses also of the high places that were in the cities of Samaria, which the kings of Israel had made to provoke the LORD to anger, Josiah took away, and did to them according to all the acts that he had done in Bethel. And he slew all the priests of the high places that were there upon the altars, and burned men's bones upon them, and returned to Jerusalem.
In comparison
The Deuteronomist probably saw Hezekiah and Josiah as equally great, because they were followers of his God, Yahweh, and did all in their power to eliminate the old gods of Israel (Samaria) and Judah, and to promote monotheism. The comparison was not between Hezekiah and Josiah, but between both of them and all the other Kings who had ever ruled Judah.
Polytheism returned after the deaths of both kings, but in the long term Judah was already on a trajectory towards monotheism.