Large deviations for squares of Bessel and Ornstein-Uhlenbeck processes