This was helpful. I managed to get it working by doing
a = pm.Normal(..., shape=(4,1))
b = pm.Normal(..., shape=(7,1))
vec = pm.math.concatenate( (a[2:3], b[1:5]), axis=0)
Printing the shapes showed that a[2] does not have the same shape as a[2:3].
Thanks very much for your assistance!