Psalms is poetry not doctrine. Get a feel for the overall themes, don't fixate on words.
Ps 37:10 is simply one of many many texts in the OT that states the hope that all would work out well for good people and things will go badly for the wicked. At this period there was no concept of judgement after death, justice was expected in this one.
When bad things happened to good people it was asssumed that they must have some secret sin - see Job's comforters as a classic example. When the wicked prospered it was reassuring to believe that their demise would come all of a sudden. The borg's favourite text about the light getting brighter is another example of the same hopeful refrain.
It was a simplistic, homespun wisdom that experience proved to be fatuous. Bad stuff happened all the time to good people the wicked clearly prospered. Later after the exile we see the development of belief in an afterlife.