How does one launch unmanned high-altitude balloons without posing a safety risk to aviation?
Unmanned balloons can indeed create a safety risk for aircraft. An aircraft could collide with the balloon itself (as described in the case that Jan Hudec posted in his comment), or with the balloon's payload (see the FAA's AIM section 7-5-4 for general comments on this).

But it's important to note that unmanned balloons are (or should be) launched only after appropriate preparation and communication; most countries have some sort of regulations to follow. In the US (for example), 14 CFR 101 governs unmanned balloon launches and it includes the following requirements:


Launches must be in (mostly) clear skies and away from airports and built-up areas
The balloon must have a radar reflector and lights (if launched at night)
ATC must be informed in advance of the balloon launch, expected path etc.
The operator must track the balloon's position and descent and report them to ATC as needed


In other words, the balloon should be as visible as possible - both visually and on radar - and ATC should know where it is. That gives pilots a way to see and avoid the balloon and ATC can provide warnings and/or avoidance instructions to aircraft directly where possible, which is actually fairly similar to how aircraft avoid other aircraft.

Of course, there may be cases where someone launches a balloon without following those rules (or the local equivalents in another country). That would create a much higher safety risk but it would be illegal and the operator would be risking penalties for doing it.