Denoting by $\operatorname{vec}:\mathbb{R}^{m\times n} \rightarrow \mathbb{R}^{mn}$ the operator transforming an $m\times n$ matrix into a column vector of $mn$ elements by "stacking" the matrix columns, it holds
$$
\operatorname{vec}(\mathbf{L} \mathbf{X} \mathbf{R}) = \left(\mathbf{R}^T \otimes \mathbf{L} \right) \operatorname{vec}(\mathbf{X}),
$$
where $\mathbf{X}, \mathbf{L}, \mathbf{R}$ are matrices of appropriate dimensions (not necessarily square) and $\otimes$ is the Kronecker product.
Using the above result, the quadratic expression can be written as
$$
\|\mathbf{AXBd}-\mathbf{c}\|^2=\|\left((\mathbf{Bd})^T \otimes \mathbf{A} \right) \operatorname{vec}(\mathbf{X})-\mathbf{c}\|^2.
$$
quadprogor thelsqlincalls! Can you give me any pointers on how to do this with CVX (which I've never used!) – Dan May 15 '17 at 16:31