This work is focused on the longtime behavior of a nonlinear evolution problem describing the vibrations of an extensible elastic homogeneous beam resting on a viscoelastic foundation with stiffness and positive damping constant. Buckling of solutions occurs as the axial load exceeds the first critical value, , which turns out to increase piecewise-linearly with . Under hinged boundary conditions and for a general axial load , the existence of a global attractor, along with its characterization, is proved by exploiting a previous result on the extensible viscoelastic beam. As , the stability of the straight position is shown for all values of . But, unlike the case with null stiffness, the exponential decay of the related energy is proved if , where and the equality holds only for small values of .