Republican lawmakers in at least five states are seeking to block undocumented children from attending public school for free or to inquire about students’ immigration status in ways that courts have held violate children’s educational rights.