Anthropomorphic robots that aim to approach human performance agility and efficiency are typically highly redundant not only in their kinematics but also in actuation. Variable-impedance actuators, used to drive many of these devices, are capable of modulating torque and impedance (stiffness and/or damping) simultaneously, continuously, and independently. These actuators are, however, nonlinear and assert numerous constraints, e.g., range, rate, and effort limits on the dynamics. Finding a control strategy that makes use of the intrinsic dynamics and capacity of compliant actuators for such redundant, nonlinear, and constrained systems is nontrivial. In this study, we propose a framework for optimization of torque and impedance profiles in order to maximize task performance, which is tuned to the complex hardware and incorporating real-world actuation constraints. Simulation study and hardware experiments 1) demonstrate the effects of actuation constraints during impedance control, 2) show applicability of the present framework to simultaneous torque and temporal stiffness optimization under constraints that are imposed by real-world actuators, and 3) validate the benefits of the proposed approach under experimental conditions.