Now, when switch is shifted, there's flux change through both the
inductors. Both will develop polarity with positive part on the same
side as the positive side of the battery
The problem is somewhat pathological in that the voltage across the inductors cannot be ordinary functions of time.
Why? The voltage across an inductor is proportional to the time derivative of the current through which means that in order for the inductor voltage to be defined for all time $t$, the inductor current must be continuous.
But, in this problem, the current through the inductors cannot be continuous at the time the switch is 'shifted' (thrown) to position 2.
Just before the switch is thrown, the resistor (and $L$ inductor) current is $i_R = \frac{\mathcal{E}}{R}$ while the current through the $2L$ inductor is zero.
Now, just after the switch is thrown, the current through the two inductors must, by KCL, be equal and so, one (or both) inductor current(s) must be discontinuous which implies that the inductor voltages do not exist at that time (the inductor voltages have a delta 'function' at the switching time).
One might try placing a large resistance $r \gg R$ in parallel with the $L$ inductor which will permit a continuous current and thus a well defined voltage across each inductor.