Asymptotics and rigidity in optimization problems over N-point configurations