He would need to pay tax on the capital gains. We have no way of knowing what the stock's cost basis is.
For sake of example, let's say the $1.8B had a cost basis of $1B. In theory the tax bill would be $160M. While that's a decent chunk of change, I definitely wouldn't describe it as "a large chunk" of the $1.8B being "subsidized by tax payers".
Also keep in mind the ultra-wealthy have all sorts of tax avoidance schemes anyway, and regardless of what he spent this money on, he is likely paying a much lower taxation rate than you or I (or the example above). That's a separate topic though.
Also, I would call 0.16 billion a large chunk of 1.8Billion as it would drop that down to 1.64 billion.
Anyway I would not call a basis of 1B out of 1.8B a highly appreciated assets. If he wants to keep a more appreciated asset with a basis of say 1/2 or 1/10th it's current price as a better long term investment you can still do this. Donate the highly appreciated stock, sell some less appreciated stock and use the proceeds to buy the stock you want which now has a much higher basis.
Then if the stock you buy tanks you can at least take a deduction when you sell it.
We hand out money to people buying a Tesla Model S’s, or paying a mortgage payment. Agree or disagree with the idea, just understand it’s not free.
So, legally they are the same thing.
PS: Though with various caviots as the law is never that simple.
Even if he had 1.8 Billion in cash and ‘only’ got to deduct from his current tax bill that still means the US population is giving up money to support his cause.
Taxes are not about the government. They are a shared burden by tax payers and anyone paying less is increasing that burden for everyone else. The only way to reduce it is for the government to sped less money.