Spectral finite elements for vibrating rods and beams with random field properties