If you want to collect data from jmx Urls defined in the specific file then you have to configure dynamic JMX URL in jmx_servers.conf and jmx_tasks.conf.
In jmx_servers.conf you have to add all JMX URLs from your file. One JMX URL entry , one server stanza with URL in jmx_servers.conf. Make server stanza name sequential like, TEST_1,TEST_2,TEST_3,.....,TEST_n. So this names can be easily used in jmx_task.conf as you mentioned in the question.
To make this changes dynamically, you have to write a script which can read JMX URLs and customize appropriate changes in jmx_servers.conf and 'jmx_tasks.conf`. This script should be executed when JMX URLs file is changed. Means whenever JMX URLs file changed at that moment jmx configuration files will be changed.
If we talk about data collection, Splunk Add-on for JMX is using default modular input. This modular input is written in such a way where any changes detected in any configurations all the server, task and template configurations will be reloaded and data collection will start with new configurations. There is no need to do any extra handing or execution of SPL for data collection.