The vaccine is designed to stimulate your immune system. Both live and killed vaccines do that.
Even for a live vaccine, the bacteria
has been injured in such a way that it can not cause any more than a brief mild case of the illness. It is highly unlikely that a vaccine could actually cause pneumonia