One thing that is absolutely certain in life is that there will be a judgment once our life is over. Some may deny this truth - but their denial will not keep it from happening. This chapter of Proverbs that has often contrasted the righteous and the wicked, will do it one last time before closing. But the contrast here is in the reward or recompense that they will receive.
The proverb begins with a sure statement. The righteous will be rewarded in the earth! There will be a reward for God's people for their faithfulness to following and obeying Him. Over and over God has given us promises that if we will do something, He will reward us for doing it. Those deeds are characterized for us by the fact that God says the reward here is for "the righteous." Therefore if we value as right what God says is right - there will be great blessing in store for us. There is reward for doing right.
The flip side of this blessing and reward is punishment and recompense. If the righteous is rewarded for his doing of what is right - how much more will we not also see the wicked and the sinner recompensed for their opposite behavior. The Hebraism that is being used here is one that says - the right will be rewarded right, therefore of course the wicked and evil will be rewarded evil as well. In a very Hebrew way the text is saying that we will reap what we sow.
One last comment comes from the reading of the Septuagint, Syrian, and Arabic versions of the Bible. They translate this verse as follows: "And if the righteous scarecely be saved, where shall the ungodly and the sinner appear?" This is what Peter quoted in 1 Peter 4:18 - and many Hebrew scholars believe he quoted it from Proverbs 11:31.
Judgment is coming . . . and the wise man will prepare for it over a lifetime. He does so by turning his heart to the Lord. We know from the New Testament that the only way a favorable judgment can be rendered to us is by receiving the forgiveness and grace offered through Jesus Christ. That grace though, will change us so that we will embrace righteousness as a lifestyle. That is what John tells us in 1 John when he writes, "By this the children of God and the children of the devil are obvious: anyone who does not practice righteousness is not of God . . . " (1 John 3:10) We practice righteousness because we have been transformed by God's grace. But is it that righteousness that we embrace and practice that proves that we are truly His. The wise man will embrace this righteousness and receive a sure reward. All that will be left for the wicked and the sinner is the surety of a terrifying end before a holy and just God.