If you haven't already, I suggest you check for hidden placeholder transactions (select Edit->Preferences..., Investment transactions, check Show hidden transactions, and select OK) in the investment account.
The buy ESPP transactions are in the investment account register but the account shows zero shares? Where are you looking that you see zero shares?