From lonely deaths among the elderly to shrinking armies, falling birthrates are reshaping societies beyond the economic sphere.