(M)ILP overlap of two intervals
In case someone else needs this in the future

I ended up using indicator constraints

$desiredOverlap_{ik} = 1 \rightarrow desiredEnd_{ik} - desiredStart_{ik} \geq 0$
$desiredOverlap_{ik} = 1 \rightarrow desiredDuration_{ik} = desiredEnd_{ik} - desiredStart_{ik}$
$desiredOverlap_{ik} = 0 \rightarrow desiredEnd_{ik} - desiredStart_{ik} \leq 0$
$desiredOverlap_{ik} = 0 \rightarrow desiredDuration_{ik} = 0$