This is a problem amenable to maximum likelihood estimation, provided one can write down the likelihood or design a latent variable representation to run an EM algorithm.
Let us denote $\bar N$ for the number of days/boxes (like $\bar N=365$ in the original problem) and $M$ for the number of individuals. Borrowing from this paper by Fisher, Funk, and Sams, the probability to have $r$ distinct birth-days in a population of $M=m$ individuals writes as
$$\mathbb P(R=r)=\frac{\bar N!}{(\bar N-r)!}\frac{m!}{\bar N^m}
\sum_{(r_1,\ldots,r_m);\\\sum_1^m r_i=r\ \&\\\sum_1^m ir_i=m}1\Big/\prod_{j=1}^m r_j! (j!)^{r_j}\tag{1}$$
where the $r_j$'s correspond to the number of days with exactly $j$ simultaneous or shared birthdays. But Feller (1970, p.102) gives the simpler representation
$$\mathbb P(R=r)={\bar{N} \choose r}\sum_{\nu=0}^r (-1)^{\nu}{r\choose\nu}\left(1-\frac{T-r+\nu}T \right)^m$$
which fits well an empirical distribution when $\bar N$ is small enough.
Feller (1970, pp.103-104) justifies an asymptotic Poisson approximation with parameter$$\lambda(M)=\bar{N}\exp\{-M/\bar N\}$$from which an estimate of $M$ can be derived. With the birthday problem as illustration (pp.105-106)!
And if I understand properly the "strong birthday" problem in Das Gupta (2005)](https://www.math.ucdavis.edu/~tracy/courses/math135A/UsefullCourseMaterial/birthday.pdf) the number of "unique" people (not sharing a birthday with anyone else) is distributed as:
$$\mathbb P(R'=r)=\sum_{i=r}^m (-1)^{i-r} \frac{i!}{r!(i-r)!}\frac{\bar N!m!(\bar N-i)^{m-i}}{i!(\bar N-i)!(m-i)!\bar N^m}\tag{2}$$