To be fair, you need to compare equivalent machines. n1-highmem-4-d has 1770 GB of local hard disk storage, while a B8 doesn't even have local storage, it has to write to Google Cloud, or to the datastore which are billed separately.
The best comparison is to the n1-highmem-4 instance, which has no local storage either. That costs $0.508 an hour (even cheaper!) compared to a B8's $0.64 an hour.
So basically, 26GB of RAM in Compute Engine is 13 cents an hour cheaper than 1GB of RAM in AppEngine. Something feels off here....