One way to interpret how the setting anticipates events in the story is to start with the title. The "peace" could mean the peace/truce that Gene tries to reconcile with Phineas (and the other boys to a lesser extent) after pushing him out of the tree. The tree has symbolic value (purposeful or not on the author's part). Gene commits his sin by pushing Phineas out of the tree: leading to a "fall." This is symbolic of humanity's fall in the Garden of Eden by eating the fruit from the tree of knowledge. Phineas lives in an ideal, sometimes imaginary world. Gene, however is concerned with the war and how he must perform at his studies en route to becoming a man. Gene is very wrapped up with this learning progression; this is akin to Adam and Eve desiring knowledge, to know what it will be like to sin against God and eat the fruit. Gene's sin seems more malicious or thoughtless than Adam's and Eve's curiosity, but the symbol of the tree indicates, at least in hindsight, a place/setting wherein something significant does occur. (Continuing with this analogy, Phineas wanted to stay in the peaceful world of childhood; the peaceful world of the garden before the fall.)
Another way to think about setting also concerns the title. While the boys are fully aware of growing up and aware that they might go off to war, for the time being they are in the sanctity of the school. It is a place "separate" from the war and from the world of adults and adult concerns. It is therefore a peaceful place. Gene recognizes that school is a temporary setting and that the world of adulthood and the horrors of war awaits him afterward. Phineas, on the other hand, is not concerned with the war, nor with growing up. In his idealism, he remains innocent and naive. It is therefore all the more tragic that after his injury, he can no longer thrive in that peaceful setting that is the school. However morbid it might sound, Phineas dying young is perhaps fitting or a mixed blessing because he would have trouble fitting in the adult world. That is just one interpretation. It could very well be that Phineas would thrive in the adult world because of his honesty and willingness to live playfully: kind of like a Forest Gump type of character.
The main setting is, of course, the school. It is "separated" from the adult world and the war. It is, relative to those worlds, peaceful. As the boys grow older, they move from that separate, peaceful world into the more troubled world of adulthood and of course the war. Therefore, their progression is inherently tied to a linear change from innocence to experience and/or from peace to conflict.