Measuring dark matter spikes around primordial black holes with Einstein Telescope and Cosmic Explorer