I've got a couple of each, and for a non-competition gun I'd go with the 17.
The frames are identical, the difference is in the slides. G34 slide is slightly longer, designed for competition. Slightly longer distance between front and rear sight gives you more accuracy; slightly longer barrel gives you potentially more accuracy from more spin plus potentially more velocity, and the longer slide/barrel combination gives you slightly less perceived recoil and rise.
All that being said - none of that is necessary outside of competition; (and perhaps not even within competition).
Your real question is going to be what generation of Glock you get. I'm personally fond of Gen 4's because I like the finger grooves. Except for my G44 (.22), and G19 (9mm), which are both Gen 5. Gen 5s tend to have ambidexrous controls, and arguably more accurate barrels, (Glock "Marksman").
Edited to add another option -
My knapsack/bureau gun is a G31, (.357Sig), with a 9mm conversion barrel in it. Heavier slide/barrel reduce rise. I've got a Trijicon RMR and a Streamlight TLR-1 mounted on it.
And another thought -
Serious decision point - MOS or iron sights? Or both? If you're going to run an optic, or may want to, you'll want an MOS slide, or you'll end up sending it out to be cut.