Is Haphazard Bombardment legal with fewer than 4 nonenchantment permanents under my opponent's control?
Yes, you can cast Haphazard Bombardment even if there are fewer than 4 valid choices for its ability, and you put aim counters on permanents even if there are fewer than 4.

Haphazard Bombardment's first ability is an "enters the battlefield" triggered ability. If you cast Haphazard Bombardment, the ability triggers after the spell resolves and becomes a permanent. Even if it did require you to choose targets, it would have no effect on whether you could cast the spell.

The ability itself has no conditions that might prevent it from triggering or resolving. So it will trigger and resolve no matter what the board state is. Then when it resolves you choose the permanents to put counters on. Rule 609.3 says


  If an effect attempts to do something impossible, it does only as much as possible.


So if it is impossible to choose 4 permanents you don't control, you choose as many permanents as possible and put counters on them.