Are molecules chiral if a rotation leads back to the same compound?
The property that you are describing for D-idaric acid is called C2 symmetry. This means that when you rotate a molecule (or any object) by 180 degrees, it appears identically to the original orientation. In D-idaric acid, the C2 symmetry axis is halfway along the bond between C3 and C4.

Having a C2 symmetry axis doesn't tell us if the compound is chiral or not. Achiral compounds have an (internal) plane of symmetry or a point of symmetry. D-Idaric acid does not meet either of these requirements and is a chiral molecule.

Galactaric acid does not have a C2 symmetry axis but does have a plane of symmetry. Galactaric acid is achiral. Since galactaric acid has stereocenters but is not chiral, we describe it as meso.