It's left deliberately ambiguous. The lead Sandman says he will transmit the infection signal when he has finished recording it but then crumbles before it is completed. The Doctor takes the survivor back to the planet so they can presumably warn everyone of the threat and we know humanity does survive into the future. Mark Gatiss has been asked to write a sequel to the story so it may answer the remaining questions.