Raman spectroscopy of polyconjugated molecules and materials: confinement effect in one and two dimensions