I don't think they do know. Nor do I think most of the shareholders know. If they did they would know that they can make way more money with forward thinking and planning beyond a quarter. The lack of that is the clearest indication I can imagine that they do not know.
See, this is the thing. An investor isn't tied to the fortunes of any one company. An investor can bail when things go south, and investors who care enough to be writing to executives or the board are also the ones most sensitive to signals things are going badly.
This is why 'activist' investing works - you can take on debt, or drive a debt-funded acquisition so that the immediate value of a share goes up, bail while people are buying the inflated price, and be running the con again while the debt kills the company. The execs are bound by the board, and don't feel empowered to fight these kinds of changes - often, they're replaced if they do (or as part of the board takeover).
Long-run, this is bad for the companies this happens to, and the overall economy, but it's good short-run for investors, and savvy investors don't need to worry about long run, because at worst they can liquidate their position before the market catches up and sit in treasuries if there's no other good poaching target.
The failure of anti-trust enforcement, of anyone to sue for long-term over short-term gains, the tax-advantaged position of stock-centered comp, and the acceptance of even debt-funded buybacks all work together to reinforce this failure state.
Most large investors are actually big groups like pension funds that do need to think longer term though. This is really just a combination of laziness and ignorance. Not a factor of evil individual investors. Those do exist but I really don't think they have as much impact as people think they do.
Most investors today are basically stock printer go brrr....
If one looks at US money printing in the past two decades, they'll find that the S&P's gains are basically just a mirror to the increased injection of dollars, a facade made to prop up the market. There really has been no actual growth compared to like Japan in the 1980s or China and India in the early 2000s, or Vietnam today. Just a few companies, mostly in tech, which are propping up the rest of the market.