I can not emphize strongly enough about vacuum leaks. Even a tiny leak can cause issues. At low air flow rates, a vacuum leak will have more impact because as a percentage, the amount is more.
Clean the MAF!
Start by monitoring the TP MODE PID. Check to see that it says C/T (closed throttle) when the throttle is actually closed. Play with the throttle checking that the PID matches the throttle's state.
Next disconnect the IAC electrical connector. The idle RPM's should drop (or the motor die). Monitor the IAC duty percent to see if it changes in response to changing motor load (AC on/off). Report.
When cold, the PCM is going to have a slightly higher idle than when hot. Perhaps some improvement can be had by increasing the idle by a small amount.
This may not be a problem that can be fixed by swaping parts (dyno tune as others have suggested). A PI motor likes more timing than a Non-PI motor. Consider that a stock 97 PCM has a timing curve set up for an Non-PI motor. You now have a new head/cam combination that flows more air. Such cams are well known for affecting low end torque. Add to this an increase in CR (from the PI swap) the load tables may just be too far off.