Bethe ansatz approach to quench dynamics in the Richardson model