Rigidity of asymptotically $AdS_2 \times S^2$ spacetimes