I conjecture that if this occurs, $a$ and $b$ are unique. Obviously if $n$ is an odd prime, this does not occur, and if $n=a^2$, it does. In any case, what is the set of numbers such that this sort of factorization exists?
For example, $510=17\cdot30$, and $17\leq 30\leq 34$.
An equivalent formulation is that the set $S_n=\{(x,\frac nx)\mid\sqrt{\frac n2}\leq x\leq\sqrt{2n}\}$ has at most one integral point (ie., $|S_n\cap \mathbb Z\times\mathbb{Z}|\in\{0,1\}~\forall n$).
The numbers for which such a factorization exists have been studied by Maier and Tenenbaum, On the set of divisors of an integer, Invent. Math. 76:1 (1984), pp. 121-128. Erdos conjectured that almost all positive integers $n$ have a factorization $n=ab$ with $a\le b\le2a$ ("almost all" means all but a set of density zero), and Maier and Tenenbaum proved a strong form of this conjecture. There are more recent, more general results by Kevin Ford, The distribution of integers with a divisor in a given interval, Annals of Mathematics, 168 (2008), 367–433.
Both papers are freely available online.