Answer: WWI would still have occurred.
Step-by-step explanation:
Even if Ferdinand were not executed, there were still tension and hatred towards Austria-Hungary, and Ferdinand and his wife. Other factors that also contributed towards the start of WWI were Militarism, Alliances, Imperialism, and Nationalism (M.A.I.N)
Just remember that Germany will be blamed for the war, mainly because of it's nationalism and it's desire to acquire more land and power.