Hammy flexibility effects the angle between a straight leg and the back, but that doesn't necessarily mean that a less flexible rider can't get flat - it just looks a little different.
A less flexible rider can acheive a quite aero position by lowering the saddle and moving it back a bit relative to the bottom bracket. Of course, this creates a position with relatively less frame reach or shorter stems, and tends to come with somewhat less drop than the more straight-legged flatbacks, but that's not necessarily a bad thing. And depending on how particular (that is, good) your framemaker and fitter are, it can signal changes to unexpected places like BB drop and chainstay length to incorporate the weight distribution changes this would suggest.
As long as the rider is physically fit enough (ie, not so fat that the pedaling smacks their thighs into their torso) this position can be every bit as aero as the large-drop positions that many wannabes set themselves up with. But the story doesn't end there.
Many amateurs equate 'drop' with aero qualities or some odd relationship to manhood, but it's not necessarily the case at all. Those same riders often have their saddles far higher than they really ought. It's a mistake borne out of the mistaken assumption that the positioning on a TT bike should be followed on a road bike. It's not necessarily so. There is more power available with the 'low-flat', because of the relative usefulness of the range of motion in the legs as relates to the circular motion of the pedal stroke. It also balances one on the bike better, which can provide better aerobic function than a position that requires neck, shoulder, and core tension to hold up so much of the torso weight. Those can easily be a greater gain than the small losses that (may or may not) happen in the aero arena. People often fail to recognize that holding the torso on extended arms is a quite different proposition than holding them on braced elbows.
Of course, that goes the other way, too. Less-fit riders, regardless of flexibility, need to go up and forward to acheive a somewhat aero position that allows their thighs and bellies not to fight one another.
So to the OP, flexibility (in the hammys and elsewhere) can make significant differences to the parameters of a well-fit bike. However, that depends perhaps more on what school of thought on fitting you adhere to. One is based on ergonomics, the other based on mathematics and oddball 'rules of thumb' like that lovable old chestnut, KOPS or what junior Italian racers in the 70's tended to look like.
Even where people are flexible enough, it's a common mistake to have saddles set too high and their weight distributed too much to the handlebars. By this point of view - and the list of 'believers' is not small, and is rather distinguished - hamstring flexibility matters relatively little to a good bike fit, but matters a lot in a poor one.