Based on the hint, a maximum of $14$ moves are required, because there are just $14$ gaps to move bricks across and you only move bricks across each gap once. If we start with all the bricks in one pile, it should be obvious that $14$ moves are necessary, so we have the answer. The challenge is proving that the hint is correct in that you can always avoid moving blocks across a gap more than once in a solution.
We prove the more general statement that the $n$ pile problem can be solved in $n-1$ moves by induction on the number of piles. Clearly the $2$ pile problem can be solved by $1$ move. Now assume that we have proven that all problems up to $k$ piles have been shown to be able to be solved in $k-1$ moves and we consider the $k+1$ pile case. If either end has more than $5$ pieces in it, we can move the excess inward and we have a $k$ pile problem, which can be solved in $k-1$ moves. Adding the move we have made, we have solved the $k+1$ pile problem in $k$ moves. If either end has less than $5$ pieces and the neighboring pile has enough to make $5$, we can move enough pieces to the end pile to make $5$ and again we have a $k$ pile problem left. The remaining problem is if the two piles at each end total less than five bricks each. We will be done if we can show there are a pair of piles $i$ and $i+1$ that we can move bricks so we have $5i$ bricks in piles $1$ through $i$. This leaves $5(k-i+1)$ bricks in piles $i+1$ through $k+1$ and now we have two problems, one with $i$ piles and one with $k-i+1$ piles. These can be solved in $i-1$ and $k-i$ moves respectively, so the total number of moves is $k$ again.
Assign a number to each pile which is five times the pile number minus the total number of bricks in that pile and all the ones of lower number. This represents how many more bricks are needed to complete all the piles up to this one. We said that there were less than five bricks between piles $1$ and $2$, so pile $2$ gets a number that is at least $6$. A pile with more than five bricks will decrease this number and one with less than five bricks will increase it. Pile $k+1$ will get $0$ because we have the right number to satisfy all the piles. Pile $k-1$ will get at most $-6$ because at least $6$ bricks must be moved to the last two piles. If there is a pile where the number is zero, we already have two separate problems and can solve them in a total of $k-1$ moves. Otherwise, the pile where the number goes negative has enough bricks to give the pile to its left to make the left pile have a number of zero, thus splitting the problem.
For an example, I modified yours to make the end piles short. I didn't make them so short tat we can't just fill up the end, but it still works. We have
$$\begin {array} {l r r r r r r r r r r r r r r r} \text{pile}&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15\\ \text {bricks}&4&4&5&2&3&11&8&6&7&10&2&2&2&4&4\\ \text {number}&1&2&2
&5&7&1&-3&-4&-6&-11&-8&-5&-2&-1&0 \end {array}$$
so we can move on brick from pile $7$ to $6$ and we have split the problem. In all the cases we have shown that we can move bricks across one gap and not have to move any across that gap again.
As I mentioned in the comment, this game is called Lights Out. The moves form a finite abelian boolean group ($g^2=0$ for all $g$), which means it will always be isomorphic to $\mathbb{Z}_2^k$ for some $k$. Also notice that any solution can be encoded as a set of cells that you have to click.
Without ever clicking the top row, you can always click the squares until only the bottom row has lit up squares. Simply go from top to bottom and keep clicking below lit up squares. It is also easy to see that there is a unique way to achieve this. Let us call this "fixing the board".
To speedrun this game, as I used to do some times, fixing the board was step one. For step two, you must memorize for every cell in the top row which cells in the bottom row will flip when you click the top cell and then fix the board. Let us call these the bottom vectors. You should then quickly recognize what linear combination of bottom vectors equals the current bottom row. Then click all corresponding cells in the top row and once again fix the board.
Notice that, in $1\times1$, $2\times2$ and $3\times3$ Lights Out, the bottom vectors are linearly independent. This exactly means that every possible board can be solved. The $4\times4$ Lights Out is also quite special, since every bottom vector is all $0$. This means that for every solvable Lights Out, there are $2^4$ ways of solving it. This is because we can click any cells in the top row and then fix the board. Hence $4\times4$ Lights Out is isomorphic to $\mathbb{Z}_2^{12}$.
In general, for $n\times m$ Lights Out ($n$ wide $m$ high), we can consider the span of all bottom vectors (these are of length $n$). Let $c$ denote the codimension of this span inside $\mathbb{Z}_2^n$. Then $n\times m$ Lights Out is isomorphic to $\mathbb{Z}_2^{n\times m-c}$. Also, any solvable Lights Out board has $2^c$ solutions.
Here is a table of some codimensions:
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\times&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20\\\hline
1&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1\\\hline
2&&0&2&0&1&0&2&0&1&0&2&0&1&0&2&0&1&0&2&0\\\hline
3&&&0&0&3&0&0&2&0&0&3&0&0&2&0&0&3&0&0&2\\\hline
4&&&&4&0&0&0&0&4&0&0&0&0&4&0&0&0&0&4&0\\\hline
5&&&&&2&0&4&1&1&0&4&0&1&1&4&0&2&0&3&1\\\hline
6&&&&&&0&0&6&0&0&0&0&0&0&0&0&6&0&0&0\\\hline
7&&&&&&&0&2&0&0&7&0&0&2&0&0&4&0&0&2\\\hline
8&&&&&&&&0&1&0&2&0&7&0&2&0&1&0&2&6\\\hline
9&&&&&&&&&8&0&1&0&0&5&0&0&1&0&8&1\\\hline
10&&&&&&&&&&0&0&0&0&0&0&0&0&0&0&0\\\hline
11&&&&&&&&&&&6&0&1&2&8&0&4&0&3&2\\\hline
12&&&&&&&&&&&&0&0&0&0&0&0&0&0&0\\\hline
13&&&&&&&&&&&&&0&1&0&0&13&0&0&1\\\hline
14&&&&&&&&&&&&&&4&2&8&1&0&6&0\\\hline
15&&&&&&&&&&&&&&&0&0&4&0&0&2\\\hline
16&&&&&&&&&&&&&&&&8&0&0&0&0\\\hline
17&&&&&&&&&&&&&&&&&2&0&3&7\\\hline
18&&&&&&&&&&&&&&&&&&0&0&0\\\hline
19&&&&&&&&&&&&&&&&&&&16&2\\\hline
20&&&&&&&&&&&&&&&&&&&&0\\\hline
\end{array}
Here is a much bigger table, which you will have to compile yourself, since it does not fit on the page:
\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\times&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20&21&22&23&24&25&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40&41&42&43&44&45&46&47&48&49&50&51&52&53&54&55&56&57&58&59&60&61&62\\\hline
1&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1&0&0&1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\hline
\end{array}
Best Answer
As noted in the comments, the asymptotic bound is precisely $\Theta(n^3)$ (For the general case, with $m\geq n$, it's actually $\Theta(m^2n)$; for clarity's sake I'm just considering $m=n$ but it's easy to adapt most of these arguments to the general case). The '180 flip' position establishes the lower bound, since there are $n^2-(\frac{n}{3})^2 = \frac{8}{9}n^2$ tiles in the outer third of rows and columns (that is, with $x$ or $y$ coordinate either $\lt n/3$ or $\gt 2n/3$) and each of those tiles must move at least $n/3$ places to get to its final positions. Any one move can only change the distance-from-target of one tile by one unit, so that sets the $O(n^3)$ lower bound.
The upper bound comes from the standard 'fill cells one by one' approach. Since each tile is no more than $2n$ cells from its final position and moving it a single square takes $O(1)$ moves (for instance, to move a cell into an empty square above it and leave the empty square above it, move the empty square D,R,U,U,L) we can fill all but one of the squares in a row in $O(n^2)$ time without having to displace any already-set tiles. The final square in a row takes more care, but that one can be filled by shifting the leftmost tile in a row down, shifting the rest of the row right, setting the final tile into either of the two rightmost squares (without disturbing any of the other cells in the row) and then shifting the rest of the row back; this is a complicated process but only adds $O(n)$ moves per row. A similar approach sets the bottom row once the rest of the puzzle is complete: $O(n)$ moves suffice to move any three tiles from the bottom row into a 'canonical position' in the bottom-right corner, perform a standard 3-cycle on them, and then undo the movements to bring them back to their original locations. Since any even permutation of the tiles in the bottom row can be expressed as a product of $O(n)$ 3-cycles, this adds $O(n^2)$ time to the total effort. In the $m\geq n$ case, the above procedure should yield $O(m^2n)$, the same as your estimate.
'All' that's left at this point is the hardest part of the problem: establishing the constant on the $n^3$ term...