The problem is with defining C in terms of the amount of heat Q (which is a function of path). We know that C should be a physical property of the material, so it should not depend on path. All the problems with C go away if, as we do in thermodynamics, we recognize and adopt the more general definitions: $$C_v=\left(\frac{\partial U}{\partial T}\right)_V$$ and $$C_p=\left(\frac{\partial H}{\partial T}\right)_P$$
The subscripts on the C's are how the C's are measured, not how they are used in practice. At constant volume, you can get $\Delta U$ by measuring Q. At constant pressure, you can get $\Delta H$ by measuring Q. So the old definition carries over into these special circumstances where the heat capacities are being measured. But the definitions in terms of U and H are much more general than that, and apply to all processes.
Yes, the specific heat capacity would be negative in that case.
Of course it wouldn't be the heat capacity $c_V$ at constant Volume or
$c_p$ at constant pressure. These are positive for ideal gases. It
would be the heat capacity for some more unusual process, where the
system gains more energy through work than it looses as heat (as you
describe it in your question).
An example are polytropic processes, which obey
$$ p \cdot V^n = \mathrm{const.} $$
with a constant exponent $n$. The molar heat capacity for such a
process is
$$ C_{\mathrm{mol}, n} = R \left[ \frac{1}{\gamma-1} - \frac{1}{n-1} \right], $$
where $\gamma$ is the adiabatic index ($\gamma = 5/3$ for a monoatomic
ideal gas) and $R$ the gas constant. (See also this question about
its derivation.)
If $1 < n < \gamma$, the heat capacity $C_{\mathrm{mol}, n}$ actually
becomes negative.
I don't know where such a process is relevant, but you can make up a
mechanical apparatus that realizes it, at least in theory. Maybe
something like this:
The weight puts some pressure on the piston, but a heavy rope is
attached to it, which is thicker in the middle. The rope runs over a
pulley and if the piston goes up part of its weight pulls the piston
up and reduces pressure. With the right mass distribution you should
get $p \propto V^{-n}$.
However, the negative heat capacity would mean that the system is
unstable. If it comes in contact with a hotter reservoir, it absorbs
heat, whereupon it expands and cools down so it can absorb even more
heat and continue expanding. On the other hand, if the reservoir is
cooler, it will continue to contract. I can imagine that, in other
systems, this may ultimately lead to states which can be described by
negative temperatures, but with an ideal gas this is not possible.
Ideal gases can only have positive temperatures. Instead, the above
contraption would eventually reach its limits, like the end of the
piston or the end of the rope, where the pressure no longer follows a
polytropic process.
Best Answer
The heat capacity (specific heat times the mass of the gas) is defined to be how much the internal energy of the gas changes due to changes in temperature, which can be done either at constant pressure $$ C_P=\left.\frac{\partial U}{\partial T}\right)_P $$ or at constant volume $$ C_V = \left.\frac{\partial U}{\partial T}\right)_V. $$ Notice that both $C_P$ and $C_V$ will be constant if the internal energy $U$ is a linear function of the temperature. This is of course the case for the ideal case, for which $$ U_{\mathrm{ideal}} = \frac{3}{2}N k_B T, $$ where $N$ is the number of particles (I've assumed monatomic here, but the linear dependence in $T$ is true of diatomic and polyatomic ideal gases as well). Microscopically, this form of the internal energy results from the fact that all of an ideal gas's energy is kinetic. Real gases, however, also have internal energy due to the potential energy of the interactions between particles. So, the total internal energy of a real gas is $$ U_{\mathrm{real}} = U_{\mathrm{ideal}} + U_{\mathrm{pot}}. $$ In textbooks, the potential part is often called the "excess" internal energy. The way it depends on temperature is different for every gas, since it depends on the details of their interactions. In general, though, it will not depend linearly on $T$. Then, the heat capacity (either $C_V$ or $C_P$) also has two parts: $$ C = \frac{\partial U}{\partial T} = \frac{3}{2}Nk_B + \frac{\partial U_{\mathrm{pot}}}{\partial T} $$ for a montaomic gas.