You're misinterpreting the "temperature" of light. Yes, we call red and orange "warm colors" and blue and purple "cool colors" but this is actually not the same as warmer or colder when it comes to radiation. Cooler black-body radiation is actually redder than hotter black-body radiation. This is why hot metal looks red or orange - when it is cool, it emits black-body radiation mostly in the infrared, which we can't see, and then when it gets hot the light becomes red or orange. This is why as metals heat up, their color goes from red to orange to yellow to white, and why hotter stars appear bluer than cooler stars. (It's not why blue flames are hotter than yellow flames though - that has to do with ionization of oxygen molecules in a flame.)
So cooler black-body radiation includes *less* ultraviolet, and so you are *less* likely to get a sunburn, not more. This agrees with what we observe.
The moon doesn't emit black-body radiation at all, but rather an altered spectrum where visible light is present, but neither ultraviolet or infrared radiation is present in appreciable amounts - this is not black-body radiation for any temperature, but is something different. This is because the light emitted is reflected sunlight, and the moon absorbs the infrared but reflects the visible light.