How would the setting affect the characters' worldview in "The Lottery"?
I think that the setting in "The Lottery" is irrelevant, as far as the characters' worldview is concerned. Saying that the setting is responsible for the characters' actions is the same as saying every crowded, small town will end up imitating the town's behavior. And that certainly isn't true.
You can judge their worldview from their actions. The characters must be intellectually deprived, for instance; somewhat uneducated, in other words. They must not have access to much information outside of their town or region. They must live in somewhat of a closed society. We know this from their actions.
We don't know this from their setting. To say the setting contributes to their actions is judgmental and prejudicial. Again, do all crowded, small towns hold human lotteries? Blaming the setting is giving in to stereotypes that rural people are stupid.
The point of the story is that normal human beings are capable of atrocious behavior when that behavior is sanctioned by the majority. The point of the story is not that crowded, small towns lead to atrocious behavior.
What you should do when thinking about this question is to think about what the setting is and what sort of worldviews people would have if they grow up in this setting.
The setting for this story is a very small farm village. We are not told where it is, but there are only about 300 people living in this town. So what kind of a worldview should we expect of people in such a place.
Stereotypically, people from small places have a very traditional worldview. All they have been exposed to is their own place and so they think that whatever is done in their place is the right thing to do. They do not really understand that people in other places would have different ways of thinking or doing things.
I think this comes through in the fact that the people really do not question the idea of a lottery. This is how things have always been done and that fits perfectly with their parochial worldview.
You have instances in the story where not only is the town described as small, but also it is understood between the lines that it was also crowded. A small, crowded town sharing one same mentality is a scary situation. It is a microcosmic stratus of the world because any place in which there is little room to grow tends to fall into chaos, because there is no organization, and the limitations are extraordinary. When one lives under fear and repression the brain and soul of the individual no longer operates under a normal tandem with the world. It is in constant self defense and preoccupation. When you have a small town full of people that are under those circumstances, the problem is bound to explode.