It depends on the topology of $E$. Here is a simple example showing $f$ might not be Borel.
By definition, a function is Borel-measurable if the preimage of every open set is Borel. However, it can be shown that it suffices to show the the preimage of every half ray $[-\infty, a )$ is Borel.
Now the exampple. Set $E = \{0,1,2\}$ where the probability (measure) of each point is $1/3$. Now let $f(x)=x$. It is measurable since every subset of $E$ is measurable (this applies also to your definition).
Equip $E$ with the indiscrete topology. That is, $E$ and $\emptyset$ are the only open sets. This implies that the Borel $\sigma$-algebra is $\{\emptyset,E\}$.
Consider $f^{-1}([-\infty,2))=\{0,1\}$. It is the inverse image of a open set but $\{0,1\}$ is not a borel set of $E$. Hence $f$ is not a Borel-measurable function.
Lebesgue gave a characterization of all Borel functions in terms of pointwise convergence and continuity. But it requires a basic knowledge of the Borel hierarchy. Roughly speaking, functions that can be obtained :
(1) initially, as the pointwise limit of continous functions (call this class 1) and
(2) as the pointwise limit of functions of the previous class (there are called Baire classes).
have a tight relationship to each level of the Borel hierarchy. Their preimages lie at each level.
If you are interested in these topic, look at A. Kechris's book Classical Descriptive Set Theory, which is the traditional discipline where Borel sets are studied in depth.
The biggest difference between a preimage and the inverse function is that the preimage is a subset of the domain. The inverse (if it exists) is a function between two sets.
In that sense they are two very different animals. A set and a function are completely different objects.
So for example: The inverse of a function $f$ might be: The function $g:\mathbb R \to \mathbb R: g(x) = \sqrt[3]{x-9}$. Whereas the preimage of a set $B$ of the function might be $[1,3.5)\cup \{e, \pi^2\}$.
Now $g(x) = \sqrt[3]{x-9}$ and $[1,3.5)\cup \{7, \pi^2\}$ are completely different types of things.
This will be the case if $f$ is $f:\mathbb R \to \mathbb R: f(x) = x^3 + 9$ and $B= [10, 51.875) \cup \{352, \pi^6 + 9\}$.
The inverse $f^{-1}(x)$ (if it exist) is the function $g$ so that if $f(x) = y$ if and only if $g(y) = x$. So if $f(x) = x^3 + 9 = y$ then if such a function exists it must be that $g(y)^3 + 9 = y$ so $g(y)^3 = y-9$ and $g(y) = \sqrt[3]{y-9}$ so $g(x) = \sqrt[3]{x-9}$.
That's that.
The pre-image of $A= [10, 51.875) \cup \{352, \pi^6 + 9\}$ is the set $\{x\in \mathbb R| f(x) \in [10, 51.875) \cup \{352, \pi^6 + 9\}\}=$
$\{x\in \mathbb R| x^3 + 9 \in [10, 51.875) \cup \{352, \pi^6 + 9\}\}=$
$\{x\in \mathbb R| x^3 \in [1, 42.875) \cup \{343, \pi^6 \}\}=$
$\{x\in \mathbb R| x \in [1, 3.5) \cup \{7, \pi^2 \}\}=$
$[1, 3.5) \cup \{7, \pi^2 \}\}$.
And that's the other.
........
Now that's not to say the inverse of a function and the pre-image of a set under the function aren't related. They are. But they refer to different concepts. This is similar to how a rectangle and its area are related. But one is a geometric shape... the other is a positive real number. THey are two different types of animals.
....
I'll add more in an hour or so but I have to take the dog for a walk. I'll be back.
.....
It occurred to me as I was walking the dog that maybe what is confusing you is that the inverse function (if it exists) and the preimage of a set have very similar notation and the only way to tell them apart is in context.
If $f$ is invertible then the inverse function is written as $f^{-1}$ so if $f(x) = x^3 + 9$ then $f^{-1}(x) = \sqrt[3]{x-9}$.
But the preimage of $B$ under $f$ whether $f$ is invertible or or not is writen as $f^{-1}(B)$.
So if $f(x) = x^3 + 9$ then $f^{-1}(17) = 2$ means that if you enter $17$ into the function $\sqrt{x -9}$ you get $2$. But $f^{-1}(\{17\})=\{3\}$ and $f^{-1}(\{36,17\}) = \{2,3\}$ means that set of values that will output $\{17\}$ is the set $\{2\}$ and the set of values that will output $\{36,17\}$ is the set $\{2,3\}$.
A few things to note:
If $f$ is invertible then the preimage of a set is the same thing as the image of the set under the inverse function and that means the notation is compatible.
If $f(x) = x^3 + 9$ then $f^{-1}([1,36)) = [1,3)$ can be interpretated as both the the image of the set under the inverse function: $f^{-1}([1,36))= \{f^{-1}(x) = g(x) = \sqrt[3]{x-9}| x\in [1,36)\}$
OR it can be interpreted as the preimage for $f$: $f^{-1}([1,36)) = \{x\in \mathbb R| f(x) \in [1,36)\}$.
but this is not the case if $f$ is not invertible.
Say $f:\mathbb R \to [-1,1]; f(x)\to \sin x$. This is not invertible.
The pre-image of$B= \{\frac {\sqrt 2}2\}$ is $\{...-\frac {11\pi}4, -\frac {9\pi}4,-\frac{3\pi}4,-\frac \pi 4, \frac \pi 4, \frac {3\pi}4, \frac {9\pi}4, \frac {11\pi}4,....\}$ this is still written as $f^{-1}( \{\frac {\sqrt 2}2\})$ even though there is no function $f^{-1}:[-1,1]\to \mathbb R$.
Another thing to note is that not all the elements in $B$ have to have pre-image values.
If $f= x^2+9$ then $f^{-1}(\{8\}) = \emptyset$. This is because $\{x\in \mathbb R| f(x) = x^2 + 9 \in \{8\}\} = \emptyset$.
And some elements may have many preimages.
And $\sin^{-1}(\{\frac {\sqrt2} 2}$ showed.
Best Answer
You can take the Cantor function $f$: as shown in this post, for any set $A \subset [0,1]$, $f^{-1}(A)$ is Lebesgue-measurable.
That's true in the particular case where $A$ is not measurable, which gives you an example.