Realism between metaphysics and science