Evolution of supernova remnants inside preexisting wind-driven cavities