We recently encountered this scenario after manually importing a custom taxonomy with hierarchy into WordPress using phpMyAdmin. When attempting to administer the custom taxonomy from the Admin menu, only the top level parent terms were displayed. All the child terms were missing. The number (count) of total terms displayed was correct but none of the child terms were visible. So we knew the child terms were there, but WordPress wasn’t attributing them to their parent categories.
Inspecting the WordPress database tables showed that child terms were also defined in the wp_options table as serialized data under the field MY_CUSTOM_TAX_children. The value for this setting for our custom taxonomy was empty.
We were able to resolve this by deleting the option MY_CUSTOM_TAX_children for our custom taxonomy, which forced WordPress to regenerate the option and the value was now populated with the hierarchical data.
The child terms were now correctly displayed under their corresponding parent terms in the Admin section.
To resolve this issue, you can manually delete the option from the database table wp_options or you can temporarily add the following into your functions.php file. Remove the line once your option has been regenerated.