Let $X \sim f$ which implies that $X \in [a,b]$ almost surely. In terms of the CDF of $X$ at the points $\{ v_i \}_{i=1}^n$, define $$ p_i := \mathbb{P}( v_{i-1} < X \le v_i ) = q_i - q_{i-1} \;, \quad 1 \le i \le n+1 $$ where we have introduced $v_0 = a$, $v_{n+1} = b$, $q_{0}=0$ and $q_{n+1} = 1$. Note that $\sum_{1 \le i \le n+1} p_i = 1$ since the sum telescopes.
More to the point, we wish to maximize the entropy $h(f)$ subject to the constraints that: $\int_a^b f(x) dx = 1$ and $\int_{v_{i-1}}^{v_i} f(x) dx = p_i$ for $1 \le i \le n+1$. As discussed in the reference below, the density of the maximum entropy distribution which satisfies these constraints is given by: $$ f(x) = Z^{-1} \exp\left( \sum_{i=1}^{n+1} \lambda_i 1_{(v_{i-1}, v_i]}(x) \right) 1_{[a,b]}(x) $$ where $Z$ is a normalization constant chosen such that $\int_a^b f(x) =1$ and where $\{ \lambda_i \}_{i=1}^{n+1}$ are Lagrange multipliers chosen such that $\int_{v_i}^{v_{i+1}} f(x) dx = p_i$. Eliminating these Lagrange multipliers and writing the density in terms of the given quantiles yields $$ f(x) = \frac{q_i - q_{i-1}}{v_i - v_{i-1}} 1_{(v_{i-1}, v_i]}(x) \;. $$$$ f(x) = \sum_i\frac{q_i - q_{i-1}}{v_i - v_{i-1}} 1_{(v_{i-1}, v_i]}(x) \;. $$
Reference
Cover, T. M., and J. A. Thomas. "Chapter 12, Maximum Entropy." Elements of Information Theory. John Wiley & Sons, 2012.