The right balance between technical and pragmatic is project specific. Here are a couple of heuristics I use to find it.
1) Minimize the overall time investment required to have an acceptable solution to the problem. Time investment includes maintenance and debugging.
2) Make sure the marginal benefit to additional time spent in one area of the project exceeds the opportunity cost of focusing on other areas. E.g. It's good to spend a lot of time on getting the overall architecture right but it matters far less to optimize the business logic (for one thing it tends to change more often and for another it's hardly ever the performance bottleneck).
1) Minimize the overall time investment required to have an acceptable solution to the problem. Time investment includes maintenance and debugging.
2) Make sure the marginal benefit to additional time spent in one area of the project exceeds the opportunity cost of focusing on other areas. E.g. It's good to spend a lot of time on getting the overall architecture right but it matters far less to optimize the business logic (for one thing it tends to change more often and for another it's hardly ever the performance bottleneck).