The rise and fall of regional inequalities with technological differences and knowledge spillovers