Consider the system of equations $$ \begin{align} a_1 b_2 &= c_1 \\ a_1 b_3 &= c_2 \\ a_2 b_1 &= c_3 \\ a_2 b_3 &= c_4 \\ a_3 b_1 &= c_5 \\ a_3 b_2 &= c_6 \\ \end{align} $$ where $c_i > 0$ are given and chosen so that the system has a solution. Also $a_j > 0$ and $b_k > 0$ for all $i, j, k$. Since there are infinite $(x > 0,y > 0)$ pairs such that $xy=z$ for any $z$, it is obvious that the system has an infinite number of solutions.
If we add a constraint such as $a_1 = b_2$, then the system has a unique solution. I know this because in this case the system can be solved by substitution:
$$ b_2 = \sqrt{c_1} \implies a_3 = \frac{c_6}{\sqrt{c_1}} \implies b_1 = \dots $$
What about the generic constraint $\sum a = \sum b$? Does the system also has a unique solution in this case? My intuition is that the problem could be analysed in terms of free variables. If the system has free variables, then it has infinite solutions. But how do I know the number of free variables in the system?
Yes, with a generic constraint $\sum a = \sum b$, then the system has a unique solution (up to square roots) in the $a_j, b_k$.
At first glance, it looks like you have $6$ equations in $6$ unknowns. But it's actually just $5$ unknowns. To see this, let {$a_1,\,a_2,\,b_1,\,b_2,\,b_3$} = {$x_1 a_3,\, x_2 a_3,\, \frac{x_3}{a_3},\,\frac{x_4}{a_3},\,\frac{x_5}{a_3}$}. It seems there will be six unknowns: $a_3$ and five $x_i$. But if you substitute this into your system, the $a_3$ will vanish.
Thus, as you put it, the $c_i$ must be chosen carefully for the system to be solvable. They must obey,
$$c_1 c_4 c_5 = c_2 c_3 c_5\tag1$$
and the general solution is,
$$a_1,\,a_2,\,b_1,\,b_2,\,b_3 = \frac{a_3c_1}{c_6},\,\frac{a_3 c_3}{c_5},\,\frac{c_5}{a_3},\,\frac{c_6}{a_3},\,\frac{c_4c_5}{a_3c_3}\tag2$$
for free variable $a_3$. But you can constrain the $a_3$ to a specific value. For example, let,
$$a_1 = b_2\tag3$$
and substituting $(2)$ onto $(3)$, then you will get $\displaystyle a_3 = \pm\frac{c_6}{\sqrt{c_1}}$ which is the same solution in your post. And so on for other constraints like $(3)$.