This is, of course, purely a matter of opinion. Most people in Western society today would not say that it is wrong to pursue material prosperity. After all, much of what we do with our lives is done in the pursuit of that sort of prosperity. Our culture does not frown on this.
Looking at this in the context of the gold rush, I would argue that there is nothing wrong with pursuing material prosperity but there can be problems with how we do so. During the gold rush, many people did many unethical things in pursuit of gold. There was a great deal of abuse of Native Americans/First Peoples. This might not have been seen as unethical and wrong at the time, but it seems that way to us today. There was also a lot of swindling, cheating, and outright theft that went on during this time. It is hard to justify that in any way. It seems that the desire for material prosperity was so strong that it overrode people’s moral compasses.
Perhaps the thing to say is that it is appropriate to pursue material prosperity but that it is wrong to pursue it in ways that are unethical and which can hurt other people.