Consider the following optimization model
$$\begin{array}{ll} \text{maximize} & \displaystyle\max_{i \in S} |x_{i}|\\ \text{subject to} & Q(x)+ \displaystyle\sum_{i \in S}|x_{i}| \leq m\end{array}$$
where $x_{i} \in \mathbb R$, $Q(x)$ denotes a quadratic function of $x$, and $m$ is a known number.
Can we write this model as a quadratic and convex optimization model, which can be solved by optimization solvers such as Gurobi or CPLEX? In particular, how should we deal with a $\max \max$ type optimization problem?
Your problem can be equivalently stated as
\begin{equation} \begin{array}{rl} \max_{x\in\mathbb{R}^n}\ &\|x\|_\infty\\ \text{s.t.}\ & x^{T}Ax+b^{T}x+\|x\|_1\leqslant{c} \end{array} \end{equation} for some symmetric positive-definite matrix $A$. The constraint is convex, but since you are maximizing a convex function, this is a hard problem (NP hard, I believe). Consequently, to solve it, we will have to introduce some binary/integer variables.
Essentially, there are two things you need to be able to do:
This should be sufficient detail to figure this out for yourself.
Note on Gurobi
If you want to solve this with Gurobi, as you stated, then you should take advantage of Gurobi's general constraints. General constraints automatically handle both of the reformulations above, and hide all the messy details from you. In combination with their support for quadratic constraints, you should be well on your way to solving.