In any case, if you believe your charitable donations are better off invested in the stock market than being put to charitable work today, then why bother donating? That means you don't believe in the charity. It would be better to find a more effective charity!
As to putting money to charity today I agree that might be a better idea.
[EDIT: Even with dividends this particular time period in Japan yielded terrible returns. Investing in the stock market for long periods doesn't guarantee returns, nothing does, but it's a pretty good probability.]
only in the aggregate. You might hit a particularly bad spell , or some black swan event happens just as you need to liquidate the holdings.
Stock needs management of some kind (even if it's index, you'd still need to decide when to liquidate, and seize the earnings while high rather than keep betting until you require the funds).