If I understand correctly, you have the uplink interface with a route to the core gateway. Then you have a VLAN where the switch is the gateway for.
The issue I can see with this so far is that you do not have a route from the core gateway going back to the switch for the subnet you are setting up for. In your example, you will need a route from the Core to 10.1.1.1 255.255.255.0 to the switch at 172.10.0.2 255.255.255.252.
Depending on the switch model and topology, you might just want to use OSPF for this instead of a static route.
Find my post helpful? Please give me a kudo!
CCNP Certified and Meraki Operator