Some Americans who put money aside and invested in 401(k)s and other retirement plans thought they had it made, but a new analysis finds that many haven’t saved nearly enough.