I'm interested in any historical examples people have of altruistic actions taken primarily to benefit future generations, which don't have strong positive effects for current generations. (So e.g. most climate change mitigation efforts wouldn't count, if we expect climate change to have a big negative impact on people currently alive - but maybe some do?)
The GitHub Archive Program probably isn't quite what you're looking for, but I think is interesting. It's not historical, and it does have some short-term effects (especially publicity).