Distributed Aggregation in the Presence of Uncertainty: A Statistical Physics Approach