Virtual invariants of Quot schemes over curves and surfaces