If one student answers every problem correctly and every other student answers every problem incorrectly, then $P_1 + P_n = (n-1) m$. I will show $P_1 +P_n \le (n-1) m$ for any set of answers, so the solution is $(n-1)m$.
Label the students $1,\ldots,n$ from highest score to lowest. Let $X_{ij} = 1$ if student $i$ answered problem $j$ incorrectly and 0 otherwise. Suppose student $w$ (for worst) answered fewer questions correctly than any other student (ties allowed). Let $r$ (for right) be the number of questions she answered correctly. I will show $ (n-1)m \ge P_1 + P_w$, from which it immediately follows $(n-1) m \ge P_1 + P_n$.
Assume without loss of generality that $w$ answered questions $1,\ldots,r$ correctly. Then
\begin{equation}
P_1 = \sum_{i\ge 2, j} X_{ij} \\
P_w = \sum_{i\ne w, j=1,\ldots, r} X_{ij}.
\end{equation}
Since each student answered at least $r$ questions correctly, $\sum_j X_{ij} \le m -r$ for any given $i$. Hence,
\begin{equation}
P_1 = \sum_{i\ge 2,j} X_{ij} \le (n-1)(m-r).
\end{equation}
Also, it is obvious that
\begin{equation}
P_w = \sum_{i\ne w,j=1,\ldots,r} X_{ij} \le (n-1) r.
\end{equation}
Adding these two inequalities gives
\begin{equation}
P_1 + P_w \le (n-1) m.
\end{equation}
This proves the result.