If you add spices to boiling pasta, will it absorb spices/flavours?
Poorly. Pasta doesn't absorb all that much flavor from spices in the water, other than maybe salt (and even then you must add excessive amounts of salt to make the resulting pasta evidently salty.) Add spices to whatever sauce you pour on the pasta, otherwise you're wasting like 90% of them. 

An alternative would be kneading the spices into the pasta dough. There are several pasta brands with spices/herbs in the dough like that.