I believe there is a valid concern about leaching if you exceed the plastic's maximum temperature rating. Coolers that use HDPE (#2) should be good to 180F which should be fine for mashing. If made out of Polypropylene (#5) they are good to 230-260F. I would expect that the higher the temperature and the longer you sustain the temperature the greater the harm could be. Even if your cooler is HDPE and you are adding boiling water to an existing mash to raise the temperature to < 180F I feel the risk would be controlled as the existing thermal mass would pull the temperature down to safe levels.