The JWST project employed many people for a long time. It helped them and their communities. Like other NASA projects, it has funded technology breakthroughs that will pay back the investment. Right now, mathematical physicists are working on a new theory that combines quantum physics and relativity and explains how the two emerge from a common root structure. This will be aided by knowledge of the early universe we get from JWST. A breakthrough there could lead to essentially limitless low-cost energy. It could possibly lead to crazy stuff like anti-gravity and magnetic monopoles. It could extend the periodic table, and allow us to create exotic substances, it could allow us to create room temperature superconductors, and it could conceivably allow us to figure out how to explore the galaxy. Our understanding of electromagnetism since the 19th century has allowed us to do miraculous things that people in earlier centuries would simply think of as pure magic. Reaching for the stars is a noble endeavor that helps us here at home.
If you are concerned that this hurt the poor, you are aiming at the wrong place with respect to poverty. The JWST did not use resources that would otherwise have been used to give immediate help to people. Money for that exists. Poverty is not a shortage or inability to feed, clothe, house, educate, and entertain people. It is a decision by people at the top who dictate what we can and cannot do with our resources. Poverty is not a material happenstance or lack of resources. It is a policy decision. The right place to aim attention for that is at the people who are allowing resources to lay idle, and money to pile up in impotent heaps while people go without.
"The works of the roots of the vines, of the trees, must be destroyed to keep up the price, and this is the saddest, bitterest thing of all. Carloads of oranges dumped on the ground. The people came for miles to take the fruit, but this could not be. How would they buy oranges at twenty cents a dozen if they could drive out and pick them up? And men with hoses squirt kerosene on the oranges, and they are angry at the crime, angry at the people who have come to take the fruit. A million people hungry, needing the fruit- and kerosene sprayed over the golden mountains. And the smell of rot fills the country. Burn coffee for fuel in the ships. Burn corn to keep warm, it makes a hot fire. Dump potatoes in the rivers and place guards along the banks to keep the hungry people from fishing them out. Slaughter the pigs and bury them, and let the putrescence drip down into the earth.
There is a crime here that goes beyond denunciation. There is a sorrow here that weeping cannot symbolize. There is a failure here that topples all our success. The fertile earth, the straight tree rows, the sturdy trunks, and the ripe fruit. And children dying of pellagra must die because a profit cannot be taken from an orange. And coroners must fill in the certificate- died of malnutrition- because the food must rot, must be forced to rot. The people come with nets to fish for potatoes in the river, and the guards hold them back; they come in rattling cars to get the dumped oranges, but the kerosene is sprayed. And they stand still and watch the potatoes float by, listen to the screaming pigs being killed in a ditch and covered with quick-lime, watch the mountains of oranges slop down to a putrefying ooze; and in the eyes of the people there is the failure; and in the eyes of the hungry there is a growing wrath. In the souls of the people the grapes of wrath are filling and growing heavy, growing heavy for the vintage." -- John Steinbeck, The Grapes of Wrath