Middle level may not be a realistic target
It is difficult to aim for a specific mid range ability level. The problem is that someone who is middle level in one aspect may be unfamiliar with another aspect, and an experienced expert in yet another. While there are some admirable people who happen to be good at everything, most people have strengths in certain areas and weaknesses in others. This means that if you ask what you consider to be a middle level question, it may turn out to be far too easy or far too difficult for the majority of users.
Instead I would recommend trying to create questions which appeal to a broad range of abilities. Perhaps a question where a technically correct answer is trivial to produce, but an answer which can compete with the best requires far more.
The question you linked to in a comment under your question has a bonus if the running time is independent of n. Having this as a bonus rather than a requirement allows people to join in even if they can't meet the condition (you can see that some have in this case). This encourages more answers while still keeping it challenging for those who want to seek the bonus. In particular, I imagine that having some lower level answers included will encourage new users or browsers to start submitting answers of their own, even if they are not yet confident.
I like king-of-the-hill competitions for this reason - at the start even the least knowledgeable of users can submit a simple answer which will do well in the early environment. Then other users can aim to beat the simple early answers, which some people find less off-putting than trying to come up with an optimal solution immediately. For example, questions like n-d tic tac toe and create your wolf.
Gradually growing solutions
Also bear in mind that someone who has the skill and imagination required to create the best solution to your question may not submit an answer at all unless they are first drawn in by the idea of a "quick solution". Just because they are capable of an elaborate solution doesn't necessarily mean they will want to spend that much time on your question when they first see it and it is a stranger to them. If you design your question to allow quick rough solutions then such imaginative people may be tempted to throw a solution together in 10 minutes, which will get them interested and familiar with the problem. From there they might decide to improve their solution as others are submitted that beat it. Eventually they may submit the full spectacular solution that they might never have written if not for the initial rough attempts.
This effect can be strengthened by providing an easy to beat answer as an example. This can be done in a king-of-the-hill contest by providing an example solution which anyone can beat. In a code-golf challenge you could post example source code. As well as making absolutely clear what is required, seeing the source code is also likely to spur people on to beat it. In both types of competition, once the answers that beat the example start coming in, the difficulty will start to increase leading to the really interesting answers.
Edit: Following the good advice in Peter Taylor's comment below, I no longer recommend including the example in the question. Simply submit it as an answer. If you refer to it in the question you may want to include a link, as the example answer isn't likely to stay at the top for very long...
Asking good questions is a real challenge
Some questions will have one easy answer and no potential to improve on it. Others will have a huge variety of fascinating different potential approaches. It's hard to give a guide to how to create questions that allow for varied approaches because it requires the same creativity to distinguish between such questions as it does to answer them. That is, sometimes the only way to find out if a variety of approaches is possible is to show the question to the community. Seeing the potential for a variety of different approaches as just one person is more difficult...
This is why asking a good question on Programming Puzzles and Code Golf is much harder than asking a good question on other Stack Exchange sites. When you find it difficult, that is because it is difficult. Don't let this discourage you - a constant supply of good questions is what makes this site work. If you think of a question and you're not sure if it will attract good quality answers, submit it and find out - either as a question or search for sandbox in meta if you want guidance first. I believe that continually submitting and getting feedback is the way to find good questions, as there are no magical shortcuts.
Setting programmers against each other will generally be more interesting than setting them against a fixed problem, as it leaves things open ended. However, short well defined questions that can be answered in 10 minutes are also important, as not everyone has a hour to commit every time they drop in to the site. A good supply of long AND short problems is essential.