Physical limits on chemical sensing in bounded domains