I think there's value in learning by extract, so you can master the elements of brewing it exposes you to.
However, you're right in thinking ahead like this. However, IMO there's a steep learning curve to do all-grain from the get-go.
That said, in order for me to brew all-grain, all I needed was a mash tun. It's helpful to have a couple extra pots or kettles, a pitcher, a mash paddle, but you can add that stuff fairly readily.
I just brewed my 12th batch today, after starting with 3 extract brews. Here's what I would do if possible in your case: I'd try to find someone to show you how to do an all-grain brew. Just seeing it done once makes all the information online and in books come alive.
Then do one with a helper to guide you. I wish I'd had that, it would have helped. I watched a guy brew an extract brew once before I did it, and that was invaluable.
Here's something else you could do: buy an all-grain kit and then do an extract brew or two at the start. Nothing about having an all-grain setup prevents you from brewing extract. If you don't have to worry about where your wort is coming from, getting mash temp correct, getting the crush right, getting the water right, it's easier to do the other things.
Anyway, you're asking the right question, IMO. Good luck and brew on!