The required minimum is n2(n−1) and is achieved if and only if the xi are all equal to n−1.
Write
i=1∑nxi2(1+x1⋯xi−1xi+1⋯xnxin−2)=i=1∑nxi2+i=1∑nx1⋯xi−1xi+1⋯xnxin
and minimise each sum separately.
To minimise the first sum, notice that
i=1∑nxi=i=1∑n(xi+1)−n=(i=1∑n(xi+1))i=1∑nxi+11−n≥n2−n=n(n−1),
so
i=1∑nxi2≥n1(i=1∑nxi)2≥n(n−1)2;
clearly, equality holds if and only if the xi are all n−1.
To minimise the second sum, apply the AM-GM inequality to obtain
x1⋯xi−1xi+1⋯xnxin+j=i∑xj≥nxi,i=1,2,…,n,
and sum over all i to get
i=1∑nx1⋯xi−1xi+1⋯xnxin≥i=1∑nxi≥n(n−1);
again, equality holds if and only if the xi are all n−1. The conclusion follows.