Water delivery by pebble accretion to rocky planets in habitable zones in evolving disks