Setup: Suppose $f:[0,1]\rightarrow\mathbb{R}$ is nondecreasing. Let $Q\subseteq[0,1]$ be the set of all points at which it is discontinuous. Suppose $Q$ is dense in $[0,1]$.
For each $x \in (0,1)$ define
\begin{align}
f(x^+) &= \lim_{\delta\searrow 0} f(x+\delta)\\
f(x^-) &= \lim_{\delta \searrow 0} f(x-\delta)
\end{align}
where the limits exist and are finite since $f$ is nondecreasing and bounded above by $f(1)$ and below by $f(0)$. Formally define $f(0^-)=f(0)$ and $f(1^+)=1$.
Claim 1: For all $x\in [0,1]$ we have
$$ f(x^-)\leq f(x) \leq f(x^+)$$
and if $x \in Q$ then either $f(x^-)<f(x)$ or $f(x)<f(x^+)$.
Proof: The first inequality follows because $f$ is nondecreasing. If $x\in Q$ then $f$ has a discontinuity at $x$, which means either $f(x^-)\neq f(x)$ or $f(x^+)\neq f(x)$. $\Box$
Claim 2: $f:[0,1]\rightarrow\mathbb{R}$ is strictly increasing.
Proof: Fix $x,y \in [0,1]$ with $x<y$. Since $Q$ is dense in $[0,1]$, there is a $q\in Q$ such that $x<q<y$ and so
$$ f(x)\leq f(q^-)\overset{(a)}{\leq} f(q)\overset{(b)}{\leq} f(q^+)\leq f(y)$$
and at least one of the inequalities must be strict, so $f(x)<f(y)$. $\Box$
Claim 3: $f([0,1])$ is uncountably infinite.
Proof: Define $A = f([0,1])$. The function $f:[0,1]\rightarrow\mathbb{R}$ can also be viewed as a function $f:[0,1]\rightarrow A$. We already know $f$ is strictly increasing and hence injective, so $|[0,1]|\leq |A|$. $\Box$
We know that nondecreasing functions can have at most countably many discontinuities, so $Q$ must be countably infinite (it cannot be a finite set since it is dense in $[0,1]$). So we can list the elements of $Q$ as
$$ Q = \cup_{i=1}^{\infty} q_i$$
Define $Z$ as the following countably infinite set:
$$ Z= \cup_{i=1}^{\infty} \{f(q_i)\}$$
For each $i \in \{1, 2, 3, ...\}$ define $V_i$ and $\overline{V}_i$ as the following open and closed intervals, respectively
\begin{align}
V_i&=(f(q_i^-), f(q_i^+))\\
\overline{V}_i &=[f(q_i^-), f(q_i^+)]
\end{align}
Define $p_i=f(q_i^+)-f(q_i^-)$ as the (positive) size of interval $V_i$.
Claim 4: $f([0,1])\setminus Z$ is disjoint from $\cup_{i=1}^{\infty}V_i$.
Proof: Suppose not. Then there is a $t \in [0,1]$ (with $t\notin Q$) and an $i \in \{1, 2, 3, ...\}$ such that $f(t)\in V_i$. Thus
$$ f(q_i^-)< f(t) < f(q_i^+)$$
Since $t\neq q_i$ we must have either $t<q_i$ (in which case $f(t)\leq f(q_i^-)$, a contradiction) or $t>q_i$ (in which case $f(t)\geq f(q_i^+)$, again a contradiction). $\Box$
Note that $f(0)<f(1)$ and
$$Z \subseteq [f(0), f(1)]$$
$$f([0,1])\subseteq[f(0),f(1)]$$
Claim 5: The sets $\overline{V}_i$ are disjoint subsets of $[f(0), f(1)]$.
Proof: Fix $i\neq j$. WLOG assume $q_i<q_j$. Since $Q$ is dense in $[0,1]$, there is a $q \in Q$ such that $q_i<q<q_j$ and so
$$f(q_i^+) \leq f(q^-) \overset{(a)}{\leq} f(q)\overset{(b)}{\leq} f(q^+)\leq f(q_j^-)$$
where either (a) or (b) is strict. So the right endpoint of interval $\overline{V}_i$ is strictly less than the left endpoint of interval $\overline{V}_j$. $\Box$
Claim 6: $f([0,1])$ is a Borel set. Specifically
$$ f([0,1]) = Z \cup E \cup \left([f(0), f(1)]\setminus \cup_{i=1}^{\infty} \overline{V}_i\right)$$
where
$$ \overline{V}_i= [f(q_i^-), f(q_i^+)]$$
and $E$ is the set of endpoints of these intervals that are in $f([0,1])$, that is, $E$ is the countable subset of $\cup_{i=1}^{\infty} \{f(q_i^-), f(q_i^+)\}$ that is in $f([0,1])$.
Proof: Claim 4 already proves $\subseteq$. It suffices to show $\supseteq$.
Suppose $y \in Z \cup E \left([f(0), f(1)]\setminus \cup_{i=1}^{\infty} \overline{V}_i\right)$. We want to show $y \in f([0,1])$. If $y \in Z$ then $y=f(q)$ for some $q\in Q$ and we are done. If $y \in E$ then (by definition of $E$) $y \in f([0,1])$ and we are done. If $y=f(0)$ or $y=f(1)$ we are also done. Suppose $y \notin Z\cup E$ and $y \neq f(0)$, $y\neq f(1)$. Then $y \in (f(0), f(1))$, but $y$ is not in $\cup_{i=1}^{\infty} \overline{V}_i$. We want to show existence of $t \in [0,1]$ such that $f(t)=y$.
Define
$$ z = \inf\{f(x) : f(x)>y, x \in [0,1]\}$$
This is an infimum over a nonempty set because $f(1)>y$. It is clear that
$$ y\leq z \leq f(1) \quad (Eq. 1) $$
By definition of $z$ and the fact $f$ is strictly increasing, there is a nonincreasing sequence of real numbers $x_k\in [0,1]$ that satisfy $f(x_k)>y$ for all $k$, and
$$ \lim_{k\rightarrow\infty} f(x_k) = z$$
Define
$$ t = \lim_{k\rightarrow \infty} x_k$$
where the limit exists because $\{x_k\}$ is nonincreasing in $k$. Then $0\leq t\leq 1$. Then
$$ f(t)\leq f(t^+) = \lim_{k\rightarrow\infty} f(x_k)=z$$
and since (Eq. 1) ensures $z\geq y$, we know $f(t^+)\geq y$.
Case 1: Suppose $y\geq f(t^-)$. Then
$$f(t^-)\leq y\leq f(t^+)$$
If $t \notin Q$ then $f$ is continuous at $t$ and so
$$f(t^-)=f(t)=f(t^+)$$
so that $y=f(t)$ and we are done. On the other hand, if $t \in Q$ then $t=q_m$ for some $m$ and we have
$$ f(q_m^-)\leq y \leq f(q_m^+)$$
and so $y \in\overline{V}_m$, a contradiction (so $t \in Q$ cannot occur).
Case 2: Suppose $y< f(t^-)$. Note that $t\neq 0$ because then $y<f(t^-)=f(0)$, but we have assumed $y>f(0)$. Since $y<f(t^-)$, there is an $x \in [0, t)$ such that
$$ y<f(x) \leq f(t^-)$$
Since $f(x)>y$ we know by definition of $z$ that
$$f(x)\geq z \quad (Eq. 2)$$
On the other hand, since $f$ is strictly increasing, $x<t$ implies $f(x)<f(t)$. We obtain
$$ f(t^+)=z\leq f(x) < f(t)\leq f(t^+)$$
where we have used (Eq. 2). This yields the contradiction $f(t^+)<f(t^+)$. So Case 2 cannot occur. $\Box$
Let $\mathcal{B}(\mathbb{R})$ be the standard Borel sigma algebra on $\mathbb{R}$ and let $\mu:\mathcal{B}(\mathbb{R})\rightarrow[0, \infty]$ be the standard Borel measure. Note that $\mu$ maps intervals to their lengths, so $\mu(\overline{V}_i)=p_i$ for all $i \in \{1, 2, 3, ...\}$.
Claim 7: We have $$\mu(f([0,1]))=f(1)-f(0) - \sum_{i=1}^{\infty}p_i$$
In particular, the set $f([0,1])$ has measure 0 if and only if $\sum_{i=1}^{\infty}p_i=f(1)-f(0)$.
Proof: We know
$$f([0,1]) = Z \cup E \cup \left([f(0),f(1)]\setminus\cup_{i=1}^{\infty}\overline{V}_i \right) $$
Since $Z$ and $E$ are countable subsets we know $\mu(Z)=\mu(E)=0$. So
\begin{align}
\mu(f([0,1])) &=\mu([f(0),f(1)]\setminus\cup_{i=1}^{\infty}\overline{V}_i)\\
&= \mu([f(0),f(1)]) - \mu(\cup_{i=1}^{\infty}\overline{V}_i)\\
&=f(1)-f(0)-\sum_{i=1}^{\infty} \underbrace{\mu(\overline{V}_i)}_{p_i}
\end{align}
where we have used the fact that the sets $\overline{V}_i$ are disjoint (Claim 5).
$\Box$
Examples: Let $Q$ be the set of all rationals in $(0,1)$. Let $\{q_i\}_{i=1}^{\infty}$ be a listing of the elements of $Q$. Consider the functions $f:[0,1]\rightarrow\mathbb{R}$ and $g:[0,1]\rightarrow\mathbb{R}$ defined by
\begin{align}
f(x) &= \sum_{i=1}^{\infty} 1_{\{q_i\leq x\}}\frac{1}{2^i} \quad \forall x \in [0,1]\\
g(x) &= x+f(x) \quad \forall x \in [0,1]\\
\end{align}
These functions satisfy the setup.
Note that $f(0)=g(0)=0$, $f(1)=1$, $g(1)=2$. Then $f([0,1])$ and $g([0,1])$ are both uncountable sets, and
$$\mu(f([0,1]))=0 \quad , \quad \mu(g([0,1])) = 1$$