Having trouble figuring out how loss was calculated for SQuAD task in BERT paper
From your description it sounds like for every position $i$ in the input text the model predicts $$p_S(i) = \mathbb P(\text{correct start position is } i)$$ and $$p_E(i) = \mathbb P(\text{correct end position is } i).$$
Now let $\hat s = \arg\max_i p_S(i)$ and $\hat e = \arg\max_i p_E(i)$ be the most probable start and end positions (according to the model). 

Then by "maximum scoring span is used as the prediction" they just mean that they output $(\hat e, \hat s)$ when predicting.

Then “The training objective is the loglikelihood of the correct start and end positions” means that if the correct start and end positions are $s^*$ and $e^*$, they try to maximize the predicted probability of $s^*$ and $e^*$. If the start and end positions are independent then this is equal to $p_S(s^*) p_E(e^*)$ and taking the negative log the loss becomes
$$L(e^*, s^*) = -\log p_S(s^*) -\log p_E(e^*).$$