But legalization could come with an increase in awareness of the harms involved and also a potential decrease in the actual harm caused by the drug.
For an example of how the harm could actually be reduced; some of the weed you buy on the street these days is coated with anything from flour to fibreglass to make it weigh more so people can get more money out of selling less weed. Goodness knows what kind of harm this might be doing to someone's lungs (avoid this stuff wherever you find it, one way to tell is to put a tiny bit on your teeth and bite it, you will be able to tell if there is something on it this way). If it was legalized the people in charge could ensure quality control on their crops, no one would be mixing shit with it to make it heavier (this is especially common in cheap hash that you get on the street too).
Also as with cigarettes (at least in this country), it could be made unlawful to advertise marijuana, and it could come with the potential damages written on the packaging. I would obviously advocate having an age restriction on it. I think, it is also important to educate people about drugs in a balanced and non-biased manner - the only education I had on the matter was essentially 'drugs are bad mmmkay'.
I think a lot would be done to reduce the harm if cannabis was made legal.
Yes, additionally, it can be ensured that Marijuana was sold only to people who have been studied by medical professionals who confirm that the risk of extreme side-effects is relatively low in this particular patient (If such kind of expertise would be possible of course). This would help to inform people of what harm can smoking weed actually cause for them personally as well as it's "normal" side-effects.