Broccoli might cause gassiness in babies
Spinach has some level of nitrates, like carrots.
According to wholesomebabyfoods website, both are suggested to be fed I think either after 8 mths or 10 mths. But some babies are ok with them.
Personally I've fed my boy spinach and broccoli before 8 mths and he's ok with it. Just that he doesn't like it when it's cooked too long
I also cook them in large amounts and then puree and freeze.