The answer is a continuation of the one by @MishaLavrov. Specifically, I prove that:
Claim: $\forall n: E[Z|X+Y=n]$ (considered as a function of $p$) is maximized at $p=1/2$.
This allows us to conclude that $E[Z] = \sum_n E[Z|X+Y=n] P(X+Y=n)$ is also maximized at $p=1/2$.
Several people have pointed out that this result is "obvious", and I agree. :) So my proof might be a bit more detailed than usual, because the whole point is to be more rigorous than perhaps customary. Apologies in advance for the tediousness!
Also, the proof is a symmetry argument, and does not come close to obtaining a closed form for general $p$ (which can then be differentiated, etc).
Consider a "trinomial" experiment: You roll an unfair $3$-sided die with faces $a,b,c$ and probabilities $p, ({1\over 2} - p), {1\over 2}$ respectively, where $p \in [0, {1\over 2}]$. You roll this die $n$ times and record the results as a sequence $\omega \in \{a,b,c\}^n$, e.g. $\omega = ccabacbcaac$. In other words $\Omega = \{a,b,c\}^n$ is the sample space and each $\omega$ is a sample point.
(Preview: the symmetry exploited will be changing every $a$ to $c$ and vice versa, but we need some preliminaries before we get there.)
Let $A,B,C$ be random variables denoting the number of $a,b,c$ (respectively) in $\omega$. Next we define/identify:
$X = A \sim Bin(n,p)$
$Y = B+C = n-X \sim Bin(n,1-p)$
$Z = \min(X,Y) = \min(A,B+C)$ is the value of interest
$X' = A+B \sim Bin(n,1/2)$
$Y' = C = n-X' \sim Bin(n,1/2)$
$Z' = \min(X',Y') = \min(A+B,C)$ is what $Z$ would have been if $p =1/2$
$W = Z' - Z$
$D = C - A$
Claim: $E[W] \ge 0\ \forall p \in [0,1/2]$, with equality iff $p = 1/2$.
Corollary: Above claim $\implies E[Z'] \ge E[Z] \ \forall p \in [0,1/2]$, i.e. $E[Z]$ is maximized at $p=1/2$.
Proof: Partition $\Omega$ into $5$ events based on $D = C - A$:
$E_0: C - A = 0:$ in this case $W = 0$
$E_1: C - A > B:$ in this case $W = (A+B) - A = B$
$E_2: C - A < -B:$ in this case $W = C - (B+C) = -B$
$E_3: B \ge C - A > 0:$ in this case $W = C - A = D$ (Note: this event $\implies B>0$)
$E_4: -B \le C - A < 0:$ in this case $W = C - A = D$ (Note: this event $\implies B>0$)
Now the symmetry: consider the mapping $f:\Omega \rightarrow \Omega$ where for each sample point, i.e. every sequence $\omega, f()$ changes every $a$ into $c$ and every $c$ into $a$. E.g. $f(ccabcabc) = aacbacba$. Clearly, $f$ is bijective and its own inverse. More importantly:
$\forall \omega: A(\omega) = C(f(\omega)), C(\omega) = A(f(\omega))$
$\forall \omega: D(\omega) = -D(f(\omega))$ since $D = C-A$
Defining, as usual, $f(E_j)$ as the range $\{f(\omega) | \omega \in E_j\}$, then we have: $f(E_0) = E_0, f(E_1) = E_2, f(E_2) = E_1, f(E_3) = E_4, f(E_4) = E_3$ since the event definitions involve ranges that are symmetric about $0$.
$\forall \omega: W(\omega) = -W(f(\omega))$. This takes a little more algebra to see:
For $E_0: W=D=0$
For $E_1, E_2:$ the values are $W = \pm B$ and $f(E_1) = E_2, f(E_2) = E_1$.
For $E_3, E_4: W = D$ and we have $W(\omega) = D(\omega) = -D(f(\omega)) = -W(f(\omega))$
Now by definition, $E[W] = \sum_{\omega \in \Omega} W(\omega) P(\omega) = \sum^4_{j=0} \sum_{\omega \in E_j} W(\omega) P(\omega)$. The $E_0$ term contributes nothing and can be dropped since in that case $W = 0$. Thus:
$$E[W] =\sum_{\omega \in E_1} W(\omega) P(\omega) + \sum_{\omega \in E_2} W(\omega) P(\omega) + \sum_{\omega \in E_3} W(\omega) P(\omega) + \sum_{\omega \in E_4} W(\omega) P(\omega)$$
Next, consider the first pair of events:
$$\sum_{\omega \in E_1} W(\omega) P(\omega) + \sum_{\omega \in E_2} W(\omega) P(\omega)$$
$$= \sum_{\omega \in E_1} W(\omega) P(\omega) + \sum_{\omega \in E_1} W(f(\omega)) P(f(\omega))$$
$$= \sum_{\omega \in E_1} W(\omega) P(\omega) + \sum_{\omega \in E_1} -W(\omega) P(f(\omega))$$
$$= \sum_{\omega \in E_1} W(\omega) (P(\omega) - P(f(\omega)) = (**)$$
Finally we get to the root of the symmetry. Consider any specific sequence $\omega$ where the random variables $A,B,C$ take values $n_A, n_B, n_C$. Then:
$P(\omega) = p^{n_A} ({1\over 2} - p)^{n_B} {1\over 2}^{n_C}$ (No need for the multinomial ${n \choose n_A, n_B, n_C}$ because $\omega$ is one specific sequence.)
$P(f(\omega)) = p^{n_C} ({1\over 2} - p)^{n_B} {1\over 2}^{n_A}$
If $n_C > n_A$ then $P(\omega) / P(f(\omega)) = ({1 \over 2} / p)^{n_C - n_A} \ge 1$, i.e. $P(\omega) \ge P(f(\omega))$, with equality iff $p = 1/2$.
Now for $\omega \in E_1$, we have both $W(\omega) > 0$ and $P(\omega) - P(f(\omega)) \ge 0$, so $(**) \ge 0$
The same is true for the other pair $E_3, E_4$. To conclude, $E[W] = \sum^4_{j=0} \sum_{\omega \in E_j} W(\omega) P(\omega) \ge 0$ with equality iff $p = 1/2$.