PDE-Constrained Optimization Models and Pseudospectral Methods for Multiscale Particle Dynamics