How are IQ test scores affected by psychological stress or trauma? Does mental stress or trauma have a significant impact on IQ test performance relative to baseline, and if so, how much?
For example, if a person is affected by abuse, bullying, neglect, or some other stressor or trauma, then how much of an effect would that have on their test score?
Short answer: The effect of stress and trauma on IQ varies significantly according to type and severity, but is overall fairly low relative to normal variation in scores.
IQ test development is heavily concerned with reliability (consistent scores) so while some variation is inevitable, IQ tests are designed to minimize the impact of stress:

... test-takers may have varying scores when taking the same test on
differing occasions, and may have varying scores when taking different
IQ tests at the same age. ... For modern tests, the confidence interval
can be approximately 10 points ...

Additionally, particularly low or high IQ scores are less reliable than median scores.  Nonetheless:

Outside influences such as low motivation or high anxiety can
occasionally lower a person's IQ test score.

So, up to approximately 10 IQ points difference in scores can be accounted for by measurement error and performance variability, but stressors can potentially result in larger differences.
Despite the broad scope of the question, I was not able to find any recent dedicated literature reviews on the effects of any particular type of stress or trauma on IQ, so conclusions are based on a sample of recent available studies.
Marcus Jenkins et al (2013) looked at the effects of family stress on child IQ:

... we identified four subconstructs that capture family stress:
Marital conflict, parenting stress, depressive symptoms and maternal
history of psychiatric disorders. ... None of the family stress
components mediated the effect of the SES components on child IQ.

Delaney-Black et al (2002), Ratner et al (2006), Koenen et al (2003), Ybarra, Wilkens, &amp; Lieberman (2007), and Ghazi et al (2012) looked at the effects of violence and trauma on child IQ:

... a child experiencing both violence exposure and trauma-related
distress at or above the 90th percentile would be expected to have a
7.5-point (SD, 0.5) decrement in IQ ...

Butler et al (2018) found similar effects on adolescent IQ.  However, Saigh et al (2006) and DePrince, Weinzierl, &amp; Combs (2009) also looked at the impact of violence and trauma on child IQ, but found no effect.
Viezel, Freer, &amp; Castillo (2015) looked at the effect of abuse and neglect, and found an approximately 5-point decrement in child IQ, while Doerfler, Toscano, &amp; Connor (2008) looked at the effect of abuse on adolescent IQ:

For Performance IQ or Full Scale IQ scores, there were no significant
main effects for gender or abuse experience.

Kira et al (2012), Kira et al (2012), and Kira et al (2014) looked at the effect of a variety of different stressors and traumas - including abuse, bullying, abandonment, and violence - on adolescent IQ in 2 vulnerable sub-groups:

Our findings support the hypothesis that different trauma types have
different influences, some positive and some negative. ... In
conclusion, trauma type differentially impacts IQ.

However, the effect of stress on overall IQ was small (r&lt;0.15).
Note that many studies found significant effects of stress and trauma on IQ sub-tests and sub-components, though overall IQ was often not significantly affected.  Note also that ethical conduct makes stress and trauma difficult to manipulate experimentally, so these studies are largely retrospective, or at best prospective, but not randomized controlled studies.  Thus, study quality is an issue, making conclusions tentative - in particular, the direction of causality is not always entirely clear.