You've mixed up two concepts. In your example of the output having multiple dimensions, you have to have some way to measure the distance by which your prediction misses the true value; call these $d_i$. The loss function would then be a function of all of the $d_i$ values. You are free to use absolute differences for either, squared differences for either, or mix the two in any order.
For example, let the true values be $\{(1, 2, 1), (2, 5, 0), (-2, 3, 3)\}$ and the predictions be $\{(4, 1, 1), (2, 4, 1), (0, 4, 2)\}$.
First, calculate the distance between the pairs of points, using some distance you find interesting, such as $L1$ or $L2$.
$$
d_{1, L1}\bigg((1, 2, 1), (4, 1, 1)\bigg) = \vert 1-4\vert + \vert 2-1\vert + \vert 1-1\vert=4\\
d_{1, L2}\bigg((1, 2, 1), (4, 1, 1)\bigg) = \sqrt{(1-4)^2 + (2-1)^2 + (1-1)^2}=\sqrt{10}
$$
In this multivariate setting, these distance values are analogous to residuals in a simple linear regression, so stick those "residuals" in the loss function. You might elect to square all of the $d_i$ values (for either $L1$ or $L2$, add those squared values, and take the square root (square loss), or you might elect to take the absolute values of those $d_i$ values and add those absolute values. You can do either with $L1$ or $L2$ distances (or some other distance) in the previous step.
Addressing "loss" vs "cost" function, those terms are loose. It is fair to separate the function you aim to optimize in the model training and the profit/loss that takes into account the consequences of being wrong, such as giving an unneeded treatment to a patient you have incorrectly diagnosed and causing them annoyance of having to go to the pharmacy vs withholding life-saving treatment from a patient with a disease but you missed it. The function you would aim to optimize in model training would (most likely) be crosentropy loss ("log loss" in some circles), and then your impression about the relative costs of misdiagnosis coming into play later.
Depending on your reference, people will not be consistent with which they call what, and some even discuss an "objective" function.