Isaiah 39 - Even the "Evil" which G-d Brings to the World is "Good" in Disguise

"At that time, Merodach-Baladan son of Baladan, king of Babylon, sent letters and a tribute to Chizkiyahu, hearing that he had recovered from illness." - Isaiah 39:1
At that time, that G-d turned back the sun for Chizkiyahu - something which was witnessed throughout the world - Merodach Baladan, who had seen it, was moved to make contact with Chizkiyahu. Prefacing his letters, he wrote, "Peace to Chizkiyahu, peace to his city, peace to the great G-d." But then he realized his error and recalled the letters to place G-d first. Because of this, G-d rewarded him with three descendants who would rule over the entire world - Nevuchadnetzar, Evil-Merodach and Belshazar.
"Chizkiyahu rejoiced over them. He showed them his treasure house - the silver and gold, the perfumes and fine oil, all his warehouses and everything that was in his treasury. There was nothing in his house and within all his kingdom which Chizkiyahu did not show them." - Isaiah 39:2
Chizkiyahu was happy to receive Merodach's messengers, thinking that he wanted to strike a strategic alliance, both their countries were coveted by Sancheiriv. But Merdach's motivation was simply to make contact with the person for whom the sun was turned back. But based on his assumption, Chizkiyahu wanted to show that his kingdom was not just a fiefdom, so he showed Merodach's messengers all of his wealth, much of it plundered from Sancheiriv's armies. He also showed them the Temple's treasures - even the Holy of Holies.
"The prophet Isaiah then came to King Chizkiyahu and told him: "What did these people tell you and where did they come from?" Chizkiyahu answered: "They came to me from faraway Babylon." (Isaiah) asked: "What did they see in your house?" And Chizkiyahu answered: "They saw everything that is in my house. There was nothing in my treasures which I did not show them." - Isaiah 39:4
Chizkiyahu had erred in showing his treasures - he was deriving honor from something not his. He had erred in rejoicing with Merodach's alliance, after G-d had saved him from Sancheiriv. And he had erred most of all in not telling the messengers the story of Jerusalem's miraculous salvation. To engage Chizkiyahu in conversation, hoping that he would realize his mistake, Isaiah asked him these seemingly innocent questions, but Chizkiyahu took them at face value, not realizing the prophet's intent.
"Isaiah then said to Chizkiyahu, Listen to the word of the Lord of Hosts: "Lo! The days will come when all that is in your house - all that your ancestors amassed until this day - shall be carried away to Babylon. Nothing shall remain." says G-d. "And from your offspring which shall issue from you, which you will beget, will be taken to be eunuchs in the palace of Babylon's king." - Isaiah 39:5-7
Chizkiyahu had erred and G-d now uses his error as a sign for things to come. As he had opened his treasures to the Babylonians, shall the Babylonians later carry them away. As Chizkiyahu had withheld himself from getting married, shall his offspring - Daniel, Hananiah, Mishael and Azaryah - become eunuchs in the Babylonian palace.
"Chizkiyahu then said to Isaiah: "The word of G-d you have spoken is good," saying, "for there shall be peace and truth in my days." - Isaiah 39:8
By no means relieved just because he would not suffer, Chizkiyahu accepts G-d's judgment - even the "evil" which G-d brings to the world is really just "good" in disguise. Just as his illness brought Chizkiyahu to repent, exile will do the same for the Jewish people. But Chizkiyahu was relieved that at least during his lifetime there would be peace to serve G-d undisturbed.
Commentary by Meam Loez