If the wiki is correct, the pricing function is the following:
price = Base_price*(1+0,75((buy-sell)/min(Buy,Sell)))
Now lets says you have a market E with Buy_E=200 and Sell_E=300 and a market I with Buy_I=200 and Sell_I=100, a base price of 1 and a trade route exporting t goods from from E to I. Then the price difference is:
PD = price_I-price_E = 0,75((200-100-t)/(min(100+t,200)-(100-300+t)/min(200+t,300))=0,75((100-t)/(100+t)-(-100+t)/(200+t)) if 0=<t=<100.
This is definitely not linear in t!
In fact even in a single market the price is not linear in the traded volume for example in I we have
P_I(t) = 1+0,75((100-t)/(100+t))=1+0.75(-1+200/(100+t)) for 0=<t=<100. This is a constant plus a convex function in t, as 1/t is clearly a strictly convex function (on the positive half-axis).
So either the wiki is wrong or the price function is strictly convex in the trade volume for at least some volumes. In the above example the function gets linear for t>100. The min in the function is responsible for it being non-linear.
Regarding the second paragraph. If the function was really linear then averaging post-and pre-trade prices would give you exactly the area underneath the price difference function. I.e. the profit function as in Profit = (PD_PostTrade+PD_PreTrade)/2*Volume would be the antiderivative of the price difference function. This implies via the fundamental theorem of calculus that the price difference function is the derivative of the profit function. In particular the profit function can only be maximal, if the price difference is equal to zero. Therefore, you would not have a price inversion problem. Granted you do not differentiate continuously, but in a discrete way and currently do not search exactly for the optimum. Therefore, the volume would probably slightly overshoot the zero price difference mark. But this is not related to the function being strictly convex or linear.
Edit: Fixed a typo in the formula.