Dynamical signatures of rank-2 U(1) spin liquids