Observation: Having read this story many times now, the obvious part of if is easily understood (especially in the longer version given in 2 Kings). Babylon sends an envoy to Jerusalem, Hezekiah shows him all their wealth, and immediately the advisors and prophets know this will actually motivate Babylon to someday come conquer Judah, thus this action is key to the future 70-year exile. However, there is so much more here.
First, what was the "miraculous sign" Babylon heard about? It isn't said here, but in 2 Kings and Isaiah we know it was the reversing of the earth's rotation. Hezekiah was dying, and was told he would be spared and offered a sign, and he asked for the shadow to retreat 10 steps up the stairs. Scholars now believe this was more than a trick in his room, as this phenomenon is recorded in other records as having been observed on sun dials. Babylon didn't just hear of it ... they witnessed it, heard that somehow this was associated with Hezekiah's recover, and sent the envoy to ask about it.
Second, what was Hezekiah's real failing here? Yes, he showed the treasures of Judah. However, his real failure was in boasting of 'his' great kingdom. Hezekiah's answer should have been to tell Babylon all about Yahweh, who controls the world and all within it. He should have boasted of the greatness of the Lord, the one so powerful that he controls the planet itself. Instead ... he showed off 'his' gold. Even Hezekiah - the king that placed his total faith in the Lord - failed to declare the Lord's greatness. It was this act that opened the door for God's future judgment and punishment when Judah ultimately turned away from him.
Third, what was the other prophetic message in the story? This is more interpretive, but it is interesting that this is a story involving Babylon, and the movement of a shadow that both advances and retreats. The accepted prophetic symbolism is that this is a sign that, when Babylon does someday come and take Judah into exile, they will later return. Going further, when Judah (Hezekiah) is taken forward into captivity by Babylon, they will later be returned (turned backward) and restored (healed from disease).
Okay ... so did Hezekiah curse Judah to exile? No, I'd say pretty confidently. The Lord was clear about his judgment and the actions of Judah, and Hezekiah's one mistake is not a deciding act. However, he did become part of the story on the method by which the Lord's judgment would be eventually carried out ... AND about the hope the Lord promised even in the midst of that judgment.
Application: I did dive into some research today about what "the miraculous sign" was that Babylon wanted to know about. I assumed it was the defeat of Assyria, so the fact that the sign given to Hezekiah for his healing was a documented event elsewhere was news to me. And of course, it's just like God to give me the REAL lesson through some academic desire to understand three words.
One of the worst things I and others do is ... fail to give the Lord public credit for 'our success'. I do this privately, thanking God for all I have and truly knowing it is all because of his choices to love and bless me and my family. However, I rarely just say that to others. In fact, I'd bet many of us have some kind of cynical reaction when we see things like athletes give thanks to God for a big win or good play.
Here's the truth: Those individuals are publicly declaring credit to the Lord, and I'm sitting here being Hezekiah ... a man who worships the Lord and rejects all kinds of evil but fails to then just tell one or two strangers about Yahweh and Jesus. Giving proper credit to the Lord isn't about praying to God and thanking him for what he's done. God knows what he's done, and that I'm thankful. Giving proper credit is about telling others, always, openly, and unashamedly.
Prayer: Lord, you do know that I am thankful for your blessings in your life, and I know very well that nothing I have is a result of anything I've ever done or been able to do. I do thank you. May I learn better to give you public credit. Amen.