Generic bounds on the approximation error for physics-informed (and) operator learning