We present the results of integral-field spectroscopic observations of the two disk galaxies NGC 3593 and NGC 4550 obtained with VIMOS/VLT. Both galaxies are known to host 2 counter-rotating stellar disks, with the ionized gas co-rotating with one of them. We measured in each galaxy the ionized gas kinematics and metallicity, and the surface brightness, kinematics, mass surface density, and the stellar populations of the 2 stellar components to constrain the formation scenario of these peculiar galaxies. We applied a novel spectroscopic decomposition technique to both galaxies, to separate the relative contribution of the 2 counter-rotating stellar and one ionized-gas components to the observed spectrum. We measured the kinematics and the line strengths of the Lick indices of the 2 counter-rotating stellar components. We modeled the data of each stellar component with single stellar population models that account for the alpha/Fe overabundance. In both galaxies we successfully separated the main from the secondary stellar component that is less massive and rotates in the same direction of the ionized-gas component. The 2 stellar components have exponential surface-brightness profiles. In both galaxies, the two counter-rotating stellar components have different stellar populations: the secondary stellar disk is younger, more metal poor, and more alpha-enhanced than the main galaxy stellar disk. Our findings rule out an internal origin of the secondary stellar component and favor a scenario where it formed from gas accreted on retrograde orbits from the environment fueling an in situ outside-in rapid star formation. The event occurred ~ 2 Gyr ago in NGC 3593, and ~ 7 Gyr ago in NGC 4550. The binary galaxy merger scenario cannot be ruled out, and a larger sample is required to statistically determine which is the most efficient mechanism to build counter-rotating stellar disks (abridged).