It's not currently possible to multiply two MLinExpr objects together like this. As a workaround, you can create auxiliary variable $$y \in \mathbb{R}^{10}$$ such that $$y_i$$ equals $$\texttt{np.sum(it) - c[i]}$$, then set the objective function equal to $$y^\top y$$:
y = model.addMVar(10, lb=-GRB.INFINITY)for i in range(10):    model.addConstr(y[i] == sum(N[i,j] * B @ x[:,j] for j in range(2)) - c[i])model.setObjective(y @ y, sense=GRB.MINIMIZE)