Is there a bijection $f:\mathbb R \to \mathbb Q^c$ such that for all $a\in \mathbb Q^c$, $f^{-1}((a, \infty)\cap\mathbb Q^c)$ is open in $\mathbb R$?
There is no bijection such that $f^{-1}((a,b))$ is open for all $a,b\in\mathbb Q^c$ as then $f$ would be continuous, but $\mathbb Q^c$ is disconnected and $\mathbb R$ is connected. But what about in this more restrictive case?
Full answer based on the method outlined by Alex Ravsky.
For ease of notation let $I$ denote $\mathbb Q^c$. Because $I$ is separable (it's a subset of the metric space $\mathbb R$), it admits a countable dense set $D$. $D$ will not contain its infimum or supremum.
Define $f|_{I\setminus D}(x) = x$.
Because $D\cup I^c$ is countable and so admits an enumeration $\{c_i:i\in\mathbb N\}$. Similarly, $D$ admits an enumeration $\{d_i:i\in\mathbb N\}$. By density, there is $d\in D$ such that $$c_1 -1 < d < c_1.$$ We then take $f(c_1)=d$.
WLOG assume $d_1\neq f(c_i)$ (else relabel). Again by density, there is $c_i$, $i\neq 1$, such that $$c_i-1 < d_1<c_i.$$ Take $f(c_i)=d_1$.
We now proceed inductively. Let $E_t$ denote the set of the $c_i$ such that $f(c_i)$ has been defined by step $t$. That is, $\forall i\in\{1,\ldots,t\}$, $c_i\in E_t$, $$c_i - \frac1i < f(c_i) < c_i$$ and $\exists j_i$ such that $c_{j_i}\in E_t$, $f(c_{j_i}) = d_i$ and $$c_{j_i} - \frac1i < d_i < c_{j_i}$$ We now aim to define $E_{t+1}$.
If $c_{t+1}\in E_{t+1}$ then proceed. If not, then by density $\exists \tilde d\in D\setminus f(E_t)$ such that $$c_{t+1} - \frac1{t+1} < \tilde d < c_{t+1}.$$ Then define $f(c_{t+1}) = \tilde d$.
If $d_{t+1}\in f(E_t)\cup \{f(c_{t+1})\}$ then proceed to the next step. If not, then by density there is some $\tilde c\notin E_t \cup \{c_{t+1}\}$ such that $$\tilde c - \frac1{t+1} < d_{t+1} < \tilde c.$$Then let $f(\tilde c) = d_{t+1}$.
Continuing we then have that $f|_{I^c\cup D}(x) < x$ and $\forall n\in \mathbb N$ $$\left|\left\{ x\in D\cup I^c: f(x) < x-\frac1n\right\}\right| \leq 2n.$$
This $f$ is the required $f$. By construction $f$ is a bijection and we claim that $\forall a\in I$ $f^{-1}((a,\infty))$ is open in $\mathbb R$.
We have (trivially) $$(f|_{I\setminus D})^{-1}((a,\infty)) = (a,\infty) \cap (I\setminus D).$$ Then because $f(x) < x$ $\forall x\in I^c \cup D$, $$(f|_{I^c\cup D})^{-1}((a,\infty)) \cap (-\infty,a) = \emptyset$$ Additionally, because $x-1 < f(x)$ $\forall x\in I^c\cup D$, $$(a+1,\infty)\cap (I^c\cup D) \subseteq (f|_{I^c\cup D})^c((a,\infty))$$ Similarly, there are at most 2 points $\{x_1,y_1\}\subseteq I^c\cup D$ such that $$\left(\left(a+\frac12,\infty\right)\cap (I^c\cup D)\right)\setminus\{x_1,y_1\} \subseteq (f|_{I^c\cup D})^{-1}((a,\infty))$$ and more generally, there are at most $2n$ points $\{x_n,y_n\}_{n=1}^m,\, m<2n$ such that $$\left(\left(a+\frac1n,\infty\right)\cap(I^c\cup D)\right) \setminus \{x_n,y_n\} \subseteq (f|_{I^c\cup D})^{-1}((a,\infty))$$ There is then a sequence $(x_n)\to a$ such that $$(f|_{I^c\cup D})^{-1}((a,\infty)) = ((a,\infty) \cap (I^c\cup D)) \setminus \{x_n:n\in\mathbb N\}$$ Finally, $$f^{-1}((a,\infty)) = (a,\infty)\setminus\{x_n:n\in\mathbb N\}$$ Because $x_n$ is convergent, $(a,\infty) \setminus\{x_n:n\in\mathbb N\}$ can be written as a (countable) union of open intervals in $\mathbb R$ and is hence open.
Because $a$ was arbitrary this concludes the proof.