Bethe/Gauge correspondence for linear quiver theories with ABCD gauge symmetry and spin chains