Yes there is polling on the US military presence in Afghanistan, but there doesn't seem to be a consensus. The Brookings Institution has an article on that entitled Americans are not unanimously war-weary on Afghanistan which is dated March 19 of 2021. The article cites a number of polls among the US civilian population as well as the US military. Let's quote the parts that cite numbers (though I think you may want to scan through the article yourself as well):
From the Brookings article, about respondents opting not to answer:
In a recent poll conducted in the fall of 2020 by the National Opinion Research Center (NORC) for researchers Peter Feaver and Jim Golby, only 59% of survey respondents answered the question about withdrawing troops from Afghanistan. In previous polls, one conducted by the University of Maryland in October 2019 and the other by YouGov in 2018, approximately one-fifth of respondents opted not to answer questions about troop levels in Afghanistan.
From the Brookings article, four quotes about polls regarding withdrawing troop levels:
In these polls, even respondents who do offer an opinion on withdrawal are divided on the question. In the NORC fall 2020 poll, 34% of survey respondents said that they supported troop withdrawals (in exchange for the Taliban’s counterterrorism assurances as per the deal struck in Doha in February 2020), while 25% said they opposed them.
Thirty-four percent of respondents to the University of Maryland poll from October 2019 were in favor of maintaining troop levels in Afghanistan, 23% were in favor of reducing troop levels, and 22% were in favor of removing all troops in the next year. A similar question asked by YouGov in 2018 also revealed mixed results.
Interestingly, however, there was greater support in the YouGov poll for removing all troops if the decision was made under a hypothetical presidential authorization. Sixty-one percent of respondents supported withdrawal in that case, while 20% opposed it.
Americans overall are more likely to support the notion of a longer timeline for withdrawal: The YouGov poll conducted in 2018 looked at a five-year time horizon and found that 42% of respondents were in favor of removing all troops in the next five years — that is, by 2023
From the Brookings article, three quotes on polling military personnel:
In the NORC and YouGov polls, military respondents are more likely to express an opinion on questions about troop withdrawal than civilians are. In the YouGov poll, that increased military response rate translated to higher support for both sides of the spectrum on the question of withdrawal: increasing and maintaining troops, as well as removing troops within the next year (but not for decreasing troop levels).
Opinions among military members are divided on withdrawal from Afghanistan, depending on their experiences. According to the NORC poll, 40% of veterans who served prior to 9/11 supported troop reductions and 32% opposed them. Yet 54% who served post-9/11 supported reductions, and 29% opposed them. It is perhaps not surprising that veterans of the post-9/11 wars are more weary of these wars.
The YouGov 2018 poll reveals notable differences between veterans who are 25 to 34 years old and those who are older. The plurality of the younger group supported maintaining troop levels for the next year, while the older group was somewhat evenly divided between all of the options — increasing, maintaining, decreasing, and removing all troops. The younger age group is also far less likely to favor removing all troops in the next year relative to the older groups: Nine percent of the younger group expressed a desire to withdraw all troops in 12 months compared to roughly 30% of the older group.
If anything, I think we can conclude (as the Brookings' article did) that there's no consensus for either option because there's a group that's unsure about the question and the remainder is divided between the main options (staying or withdrawing, or something in-between).
I understand that you are looking for even more specific polls, preferably ones that focus on what the US public wants regarding the Taliban situation in Afghanistan. Given that there's already a group with no clear opinion about the US presence and that those who do have an opinion are divided, I think a more complicated question about the Afghan political situation is even harder to poll. Without some basic knowledge about the Taliban and Afghan politics, how can someone form an opinion about whether it is worth putting (US) troops as risk for?