Anthropogenic climate change threatens biodiversity on Earth. In response, species can adapt evolutionarily to changing environments or shift their ranges via dispersal. However, dispersal itself can evolve on ecological timescales. We explore theoretically how dispersal evolution modulates the response of metacommunities to climate change. We find that this response depends on the environmental conditions prior to climate change. Variable environments harbour few, dispersive species that are likely to survive climate change by shifting their ranges with their evolved dispersal abilities. Stable environments house many, less dispersive species. Their survival during climate change is less likely, as they can evolve robust, low dispersal traits that prevent range shifts. We identify a limited set of scenarios in which contemporary dispersal evolution can rescue species from climate change, highlighting the importance of species' evolutionary histories and evolutionary rates, as determined by their genotype-phenotype maps, for their responses to rapid environmental change.