There is mounting empirical evidence that many communities of living organisms display key features which closely resemble those of physical systems at criticality. We here introduce a minimal model framework for the dynamics of a community of individuals which undergoes local birth-death, immigration, and local jumps on a regular lattice. We study its properties when the system is close to its critical point. Even if this model violates detailed balance, within a physically relevant regime dominated by fluctuations, it is possible to calculate analytically the probability density function of the number of individuals living in a given volume, which captures the close-to-critical behavior of the community across spatial scales. We find that the resulting distribution satisfies an equation where spatial effects are encoded in appropriate functions of space, which we calculate explicitly. The validity of the analytical formulae is confirmed by simulations in the expected regimes. We finally discuss how this model in the critical-like regime is in agreement with several biodiversity patterns observed in tropical rain forests.