Equitable Allocation

This questions borders on the actuarial side of things but the general solution should have relevance in several situations. Suppose we have a set of $k$ people who will retire in $\{n_1,...,n_k\}$ years respectively. We say an allocation of $M$ is equitable if each person receives an equivalent lump sum value at retirement. Let's assume the rate of return is constant and equal to $r$ and we will denote each persons allocation as $m_i$ respectively. We then have the following system,

$M=m_1+...+m_k$ $m_i(1+r)^{n_i}=m_j(1+r)^{n_j}$

For all values of $i$ and $j$. It is not clear to me that we can guarantee a solution for general values of k and n_i. Especially as the number of people grow. Any help is greatly appreciated!

You're writing it in terms of the growth factors and annual compounding. You want to split up $M$ so that as each piece grows over time, the $i$th person at time $n_i$ gets paid the same amount as the $j$th person gets at time $n_j$. So simply scale by the corresponding discount factors. Let $$\alpha_i = \frac{(1+r)^{-n_i}}{\sum_j (1+r)^{-n_j}}$$
Then $$\sum \alpha_i = 1$$ and $$\alpha_i (1+r)^{n_i} = \alpha_j (1+r)^{n_j}$$ so you can define $$m_i = M \alpha_i$$ and then $$\sum_i m_i = M$$ and $$m_i (1+r)^{n_i} = m_j (1+r)^{n_j},$$ as desired.