I've shot all three of the competition types you listed above, and usually used a Glock 9mm to do it.
You are correct in your summary of the areas where the G34 and G17 are legal, and the answer to your question is, the G17 is legal to shoot in more different divisions than the G34. However, that really isn't the whole answer. While you may be able to shoot the G17 in more classes, I don't think the G17 would be the best choice for many of them. This is another way of saying: if you use a G17, you might get beat by another shooter of similar skill who is using a G34, as it does have some advantages over the G17. These would include a lighter trigger pull weight (if you get a G34 with the "-" connector option from the factory) and a longer sight radius (both of which will help with practical accuracy), and an extended magazine release button and slide release for quicker magazine changes/reloads. Some folks will claim that the slightly longer barrel/slide of the G34 helps in close-distance point-shooting, as you have more gun to point. Personally, I prefer the balance of the longer G34 over the G17, although I shoot both regularly. The G34 does cost more than a G17 though, so that also should be taken into consideration.
I believe you'd only find the G34 restricted in GSSF matches, where it is limited to Competition-class. In IDPA and USPSA, unmodified G17s and G34s would be allowed in the same classes/divisions, and with modifications, either could be shot in the "anything-goes" classes.
Hope you find this helpful. Welcome to the world of Glock gun games!
"Placement is power" -- seen in an article by Stephen A. Camp
(RIP, Mr. Camp; you will be remembered, and missed)